jarbin-c-coding-style 2.0.0__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/.gitignore +1 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/CHANGELOG.md +20 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/PKG-INFO +12 -11
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/README.md +11 -10
- jarbin_c_coding_style-2.1.0/VERSION +1 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/README.md +18 -17
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/README.md +17 -16
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/analysis.md +100 -18
- jarbin_c_coding_style-2.1.0/devs/docs/sources/cache.md +156 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/cli.md +4 -1
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/configs.md +34 -18
- jarbin_c_coding_style-2.1.0/devs/docs/sources/engine.md +326 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/fixers.md +6 -1
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/outputs.md +23 -4
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/rules.md +17 -1
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/subcommands.md +28 -11
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/docs/README.md +1 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/pyproject.toml +1 -1
- jarbin_c_coding_style-2.1.0/sources/analysis/facts.py +593 -0
- jarbin_c_coding_style-2.1.0/sources/analysis/project.py +657 -0
- jarbin_c_coding_style-2.1.0/sources/build_info.json +6 -0
- jarbin_c_coding_style-2.1.0/sources/cache/codec.py +233 -0
- jarbin_c_coding_style-2.1.0/sources/cache/fingerprint.py +95 -0
- jarbin_c_coding_style-2.1.0/sources/cache/store.py +657 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/cli/arguments.py +3 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/configs/project.py +68 -4
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/configs/schema/project.py +5 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/constants.py +18 -6
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/engine/api.py +256 -25
- jarbin_c_coding_style-2.1.0/sources/engine/incremental.py +682 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/engine/runner.py +67 -9
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/html/renderer.py +2 -1
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/json/renderer.py +4 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/json/report.schema.json +15 -4
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/terminal/renderer.py +2 -1
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/semantic.py +9 -8
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/structure.py +2 -2
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/check/fixing.py +6 -2
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/check/handler.py +45 -3
- jarbin_c_coding_style-2.1.0/sources/utils/__init__.py +0 -0
- jarbin_c_coding_style-2.0.0/VERSION +0 -1
- jarbin_c_coding_style-2.0.0/devs/docs/sources/engine.md +0 -186
- jarbin_c_coding_style-2.0.0/sources/analysis/project.py +0 -286
- jarbin_c_coding_style-2.0.0/sources/build_info.json +0 -6
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/LICENSE +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/diagnostics.md +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/errors.md +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/integrations.md +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/selftest.md +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/devs/docs/sources/utils.md +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/docs/getting-started/README.md +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/docs/reference/rules/README.md +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/__main__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/analysis/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/analysis/directives.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/analysis/lexer.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/analysis/parser.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/analysis/source.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/analysis/syntax.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/analysis/tokens.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/analysis/unit.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/application.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/cli → jarbin_c_coding_style-2.1.0/sources/cache}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/configs → jarbin_c_coding_style-2.1.0/sources/cli}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/cli/completion.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/cli/context.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/cli/converters.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/cli/help.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/cli/parser.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/configs/schema → jarbin_c_coding_style-2.1.0/sources/configs}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/configs/editor.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/configs/ini.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/diagnostics → jarbin_c_coding_style-2.1.0/sources/configs/schema}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/engine → jarbin_c_coding_style-2.1.0/sources/diagnostics}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/diagnostics/fingerprint.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/diagnostics/model.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/errors → jarbin_c_coding_style-2.1.0/sources/engine}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/engine/examples.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/engine/outcome.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/engine/plan.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/engine/scanner.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/enums.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/fixers → jarbin_c_coding_style-2.1.0/sources/errors}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/errors/exceptions.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/integrations → jarbin_c_coding_style-2.1.0/sources/fixers}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/base.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/conflicts.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/diff.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/engine.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/journal.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/kinds.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/layout.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/model.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/registry.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/text.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/verify.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/fixers/writer.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/integrations/ci → jarbin_c_coding_style-2.1.0/sources/integrations}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/integrations/editors → jarbin_c_coding_style-2.1.0/sources/integrations/ci}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/integrations/ci/github.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/integrations/git → jarbin_c_coding_style-2.1.0/sources/integrations/editors}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/integrations/update → jarbin_c_coding_style-2.1.0/sources/integrations/git}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/integrations/git/repository.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/outputs → jarbin_c_coding_style-2.1.0/sources/integrations/update}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/integrations/update/installers.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/integrations/update/releases.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/integrations/update/state.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/outputs/github → jarbin_c_coding_style-2.1.0/sources/outputs}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/outputs/html → jarbin_c_coding_style-2.1.0/sources/outputs/github}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/github/renderer.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/outputs/json → jarbin_c_coding_style-2.1.0/sources/outputs/html}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/outputs/junit → jarbin_c_coding_style-2.1.0/sources/outputs/json}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/outputs/sarif → jarbin_c_coding_style-2.1.0/sources/outputs/junit}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/junit/renderer.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/registry.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/report.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/outputs/terminal → jarbin_c_coding_style-2.1.0/sources/outputs/sarif}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/sarif/renderer.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/rules → jarbin_c_coding_style-2.1.0/sources/outputs/terminal}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/outputs/terminal/style.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/rules/primitives → jarbin_c_coding_style-2.1.0/sources/rules}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/arguments.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/catalog.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/advanced/constant_pointers.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/advanced/line_break_at_end_of_file.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/advanced/static.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/advanced/typing.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/control_structures/conditional_branching.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/control_structures/goto.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/control_structures/ternary_operators.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/extensions/language_extensions.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/files_organization/contents_of_the_repository.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/files_organization/file_coherence.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/files_organization/file_extension.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/files_organization/fixtures/program +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/files_organization/naming_files_and_folders.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/functions/coherence_of_functions.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/functions/comments_inside_a_function.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/functions/functions_without_parameters.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/functions/naming_functions.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/functions/number_of_columns.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/functions/number_of_lines.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/functions/number_of_parameters.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/functions/structures_as_parameters.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/constant_values.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/file_header.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/global_variables.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/include.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/indentation_of_preprocessor.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/inline_assembly.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/leading_trailing_lines.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/line_endings.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/separation_of_functions.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/global_scope/trailing_spaces.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/header_files/content.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/header_files/include_guard.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/header_files/macros.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/layout_inside_a_function_scope/blank_lines.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/layout_inside_a_function_scope/code_line_content.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/layout_inside_a_function_scope/curly_brackets.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/layout_inside_a_function_scope/indentation.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/layout_inside_a_function_scope/spaces.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/layout_inside_a_function_scope/variable_declarations.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/variables_and_types/naming_identifiers.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/variables_and_types/pointers.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/categories/variables_and_types/structures.ini +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/data/verbs.txt +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/definition.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/loader.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/paths.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/selftest → jarbin_c_coding_style-2.1.0/sources/rules/primitives}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/base.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/braces.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/directives.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/indentation.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/layout.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/naming.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/project.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/registry.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/repository.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/review.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/spacing.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/syntax.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/text.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/primitives/tokens.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/rules/template.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/subcommands → jarbin_c_coding_style-2.1.0/sources/selftest}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/selftest/cases.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/services.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/subcommands/check → jarbin_c_coding_style-2.1.0/sources/subcommands}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/base.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/subcommands/info → jarbin_c_coding_style-2.1.0/sources/subcommands/check}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/check/command.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/subcommands/rule → jarbin_c_coding_style-2.1.0/sources/subcommands/info}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/info/command.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/info/handler.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/registry.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/subcommands/test → jarbin_c_coding_style-2.1.0/sources/subcommands/rule}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/rule/command.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/rule/handler.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/rule/render.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/runner.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/subcommands/update → jarbin_c_coding_style-2.1.0/sources/subcommands/test}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/test/command.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/test/handler.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/test/render.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/test/runner.py +0 -0
- {jarbin_c_coding_style-2.0.0/sources/utils → jarbin_c_coding_style-2.1.0/sources/subcommands/update}/__init__.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/update/command.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/subcommands/update/handler.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/utils/build_info.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/utils/git.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/utils/globs.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/utils/logging.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/utils/schema.py +0 -0
- {jarbin_c_coding_style-2.0.0 → jarbin_c_coding_style-2.1.0}/sources/utils/versions.py +0 -0
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
Every notable change to **JCCS** (Jarbin C Coding Style). Versions follow [Semantic Versioning](https://semver.org).
|
|
4
4
|
`jccs update --notes` prints the section of a version from this file.
|
|
5
5
|
|
|
6
|
+
## [2.1.0] - 2026-12-04
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- `jccs check` now hides diagnostics below `minor` by default: `info` review items no longer fill the output. Run with
|
|
11
|
+
`--min-severity info` to see them again.
|
|
12
|
+
- Errors about an invalid value in `.JCCS/.jccs.ini` now give the line: `<path>:<line>: Invalid value ...`.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- `jccs check --min-severity <info|minor|major|fatal>` (default `minor`): hides lower diagnostics from the output and
|
|
17
|
+
from every report (`--output`, `--report`, GitHub files). Diagnostics that count toward failure and internal `jccs/`
|
|
18
|
+
diagnostics are never hidden, and the exit code does not change. The text summary ends with `Hidden: N below
|
|
19
|
+
<level>`; JSON reports gain `run.min_severity` and `summary.hidden`.
|
|
20
|
+
- Result cache for `jccs check`, on by default, in `.JCCS/cache/cache.sqlite`: unchanged files are served from the cache
|
|
21
|
+
without being parsed again, including the cross-file checks, with results identical to a run without cache. Config
|
|
22
|
+
keys `[jccs] cache` and `cache_dir`; flags `--cache <dir>` and `--no-cache` (no longer refused); off under `--ci`
|
|
23
|
+
unless `--cache` is given. JSON reports gain `summary.files.cache_hits` and `run.cache`; `--paths` and
|
|
24
|
+
`jccs info --config-path` print the cache directory; `-V` traces the cache use.
|
|
25
|
+
|
|
6
26
|
## [2.0.0] - 2026-12-03
|
|
7
27
|
|
|
8
28
|
Complete rewrite. **JCCS** 2 shares no code with 1.x: the command line, the rule format, the configuration and the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: jarbin-c-coding-style
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Check that C sources follow the Epitech C Coding Style (or your own rules), and fix the safe cases.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Jarjarbin06/Jarbin-C-Coding-Style
|
|
6
6
|
Project-URL: Documentation, https://github.com/Jarjarbin06/Jarbin-C-Coding-Style/blob/main/docs/README.md
|
|
@@ -29,7 +29,7 @@ Description-Content-Type: text/markdown
|
|
|
29
29
|
|
|
30
30
|
# Jarbin C Coding Style
|
|
31
31
|
|
|
32
|
-

|
|
33
33
|

|
|
34
34
|

|
|
35
35
|

|
|
@@ -44,13 +44,12 @@ jccs check
|
|
|
44
44
|
```text
|
|
45
45
|
src/main.c:10:18: minor [C-L3:binary_operator] operator '+' must have one space on both sides
|
|
46
46
|
src/main.c:13:5: minor [C-L6:after_declarations] 2 blank line(s) after the declarations (expected 1)
|
|
47
|
-
...
|
|
48
47
|
|
|
49
48
|
Findings by rule:
|
|
50
49
|
C-L3 1 Spaces
|
|
51
50
|
C-L6 1 Blank lines
|
|
52
51
|
|
|
53
|
-
Files analysed: 1 | Findings: 2 (0 fatal, 0 major, 2 minor, 0 info) | To review:
|
|
52
|
+
Files analysed: 1 | Findings: 2 (0 fatal, 0 major, 2 minor, 0 info) | To review: 0 | Hidden: 4 below minor
|
|
54
53
|
Result: FAILED (2 finding(s) >= minor exceeded max_errors 0)
|
|
55
54
|
```
|
|
56
55
|
|
|
@@ -62,28 +61,28 @@ Result: FAILED (2 finding(s) >= minor exceeded max_errors 0)
|
|
|
62
61
|
- **The whole project at once.** Rules see every file together: headers, prototypes, file organisation, unused
|
|
63
62
|
functions that should be `static`.
|
|
64
63
|
- **Findings and review items.** Exact checks fail the run; heuristic and manual checks become review items that a
|
|
65
|
-
person confirms, so a guess never blocks a merge.
|
|
64
|
+
person confirms, so a guess never blocks a merge. `info` results stay out of the way until you ask for them with
|
|
65
|
+
`--min-severity info`.
|
|
66
66
|
- **Safe fixes.** `--fix` rewrites whitespace and layout only, verifies every change before writing, keeps a journal,
|
|
67
67
|
and `--rollback` undoes a run.
|
|
68
68
|
- **Your own rules.** Every rule is an `.ini` file. Tune arguments and severities per project, or write new rules with
|
|
69
69
|
`jccs rule`.
|
|
70
70
|
- **Reports for every tool.** Text, JSON, JUnit, SARIF, GitHub annotations, and an interactive HTML page.
|
|
71
|
+
- **Fast reruns.** A result cache reuses the analysis of unchanged files, with the same findings as a full run.
|
|
71
72
|
- **Ready for CI.** Deterministic output with `--ci`, `--changed-only` for pull requests, a GitHub Action and
|
|
72
73
|
pre-commit hooks.
|
|
73
74
|
|
|
74
75
|
## Quick start
|
|
75
76
|
|
|
76
|
-
**JCCS** runs on **Linux** with **Python** 3.12
|
|
77
|
+
**JCCS** runs on **Linux** with **Python** 3.12 or later. Install it from **PyPI** with **pipx**:
|
|
77
78
|
|
|
78
79
|
```bash
|
|
79
|
-
|
|
80
|
-
cd Jarbin-C-Coding-Style
|
|
81
|
-
make install
|
|
80
|
+
pipx install jarbin-c-coding-style
|
|
82
81
|
jccs info --check-env
|
|
83
82
|
```
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
[installation tutorial](docs/getting-started/installation.md)
|
|
84
|
+
To run it from a checkout instead (`git clone`, then `make install`), follow the
|
|
85
|
+
[installation tutorial](docs/getting-started/installation.md).
|
|
87
86
|
|
|
88
87
|
Then, at the root of a C project:
|
|
89
88
|
|
|
@@ -114,10 +113,12 @@ jccs check --fix --diff
|
|
|
114
113
|
|----------------------------------------------------------|---------------------------------------------------------|
|
|
115
114
|
| `jccs check` | Checks the project in the current directory |
|
|
116
115
|
| `jccs check src/ include/` | Reports only on these paths |
|
|
116
|
+
| `jccs check --min-severity info` | Also shows `info` results, most review items included |
|
|
117
117
|
| `jccs check --fix` | Applies the safe fixes |
|
|
118
118
|
| `jccs check --report html:../jccs.html` | Also writes an interactive HTML report |
|
|
119
119
|
| `jccs check --ci --report sarif:jccs.sarif` | Runs for a pipeline and writes a SARIF report |
|
|
120
120
|
| `jccs check --changed-only main` | Reports only on files changed since `main` |
|
|
121
|
+
| `jccs check --no-cache` | Analyses every file again, without the result cache |
|
|
121
122
|
| `jccs rule --list` | Lists the rules, built-in and custom |
|
|
122
123
|
| `jccs rule --show layout_inside_a_function_scope spaces` | Explains one rule (`C-L3`): checks, arguments, examples |
|
|
123
124
|
| `jccs info` | Prints the version, paths and environment |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Jarbin C Coding Style
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|

|
|
5
5
|

|
|
6
6
|

|
|
@@ -15,13 +15,12 @@ jccs check
|
|
|
15
15
|
```text
|
|
16
16
|
src/main.c:10:18: minor [C-L3:binary_operator] operator '+' must have one space on both sides
|
|
17
17
|
src/main.c:13:5: minor [C-L6:after_declarations] 2 blank line(s) after the declarations (expected 1)
|
|
18
|
-
...
|
|
19
18
|
|
|
20
19
|
Findings by rule:
|
|
21
20
|
C-L3 1 Spaces
|
|
22
21
|
C-L6 1 Blank lines
|
|
23
22
|
|
|
24
|
-
Files analysed: 1 | Findings: 2 (0 fatal, 0 major, 2 minor, 0 info) | To review:
|
|
23
|
+
Files analysed: 1 | Findings: 2 (0 fatal, 0 major, 2 minor, 0 info) | To review: 0 | Hidden: 4 below minor
|
|
25
24
|
Result: FAILED (2 finding(s) >= minor exceeded max_errors 0)
|
|
26
25
|
```
|
|
27
26
|
|
|
@@ -33,28 +32,28 @@ Result: FAILED (2 finding(s) >= minor exceeded max_errors 0)
|
|
|
33
32
|
- **The whole project at once.** Rules see every file together: headers, prototypes, file organisation, unused
|
|
34
33
|
functions that should be `static`.
|
|
35
34
|
- **Findings and review items.** Exact checks fail the run; heuristic and manual checks become review items that a
|
|
36
|
-
person confirms, so a guess never blocks a merge.
|
|
35
|
+
person confirms, so a guess never blocks a merge. `info` results stay out of the way until you ask for them with
|
|
36
|
+
`--min-severity info`.
|
|
37
37
|
- **Safe fixes.** `--fix` rewrites whitespace and layout only, verifies every change before writing, keeps a journal,
|
|
38
38
|
and `--rollback` undoes a run.
|
|
39
39
|
- **Your own rules.** Every rule is an `.ini` file. Tune arguments and severities per project, or write new rules with
|
|
40
40
|
`jccs rule`.
|
|
41
41
|
- **Reports for every tool.** Text, JSON, JUnit, SARIF, GitHub annotations, and an interactive HTML page.
|
|
42
|
+
- **Fast reruns.** A result cache reuses the analysis of unchanged files, with the same findings as a full run.
|
|
42
43
|
- **Ready for CI.** Deterministic output with `--ci`, `--changed-only` for pull requests, a GitHub Action and
|
|
43
44
|
pre-commit hooks.
|
|
44
45
|
|
|
45
46
|
## Quick start
|
|
46
47
|
|
|
47
|
-
**JCCS** runs on **Linux** with **Python** 3.12
|
|
48
|
+
**JCCS** runs on **Linux** with **Python** 3.12 or later. Install it from **PyPI** with **pipx**:
|
|
48
49
|
|
|
49
50
|
```bash
|
|
50
|
-
|
|
51
|
-
cd Jarbin-C-Coding-Style
|
|
52
|
-
make install
|
|
51
|
+
pipx install jarbin-c-coding-style
|
|
53
52
|
jccs info --check-env
|
|
54
53
|
```
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
[installation tutorial](docs/getting-started/installation.md)
|
|
55
|
+
To run it from a checkout instead (`git clone`, then `make install`), follow the
|
|
56
|
+
[installation tutorial](docs/getting-started/installation.md).
|
|
58
57
|
|
|
59
58
|
Then, at the root of a C project:
|
|
60
59
|
|
|
@@ -85,10 +84,12 @@ jccs check --fix --diff
|
|
|
85
84
|
|----------------------------------------------------------|---------------------------------------------------------|
|
|
86
85
|
| `jccs check` | Checks the project in the current directory |
|
|
87
86
|
| `jccs check src/ include/` | Reports only on these paths |
|
|
87
|
+
| `jccs check --min-severity info` | Also shows `info` results, most review items included |
|
|
88
88
|
| `jccs check --fix` | Applies the safe fixes |
|
|
89
89
|
| `jccs check --report html:../jccs.html` | Also writes an interactive HTML report |
|
|
90
90
|
| `jccs check --ci --report sarif:jccs.sarif` | Runs for a pipeline and writes a SARIF report |
|
|
91
91
|
| `jccs check --changed-only main` | Reports only on files changed since `main` |
|
|
92
|
+
| `jccs check --no-cache` | Analyses every file again, without the result cache |
|
|
92
93
|
| `jccs rule --list` | Lists the rules, built-in and custom |
|
|
93
94
|
| `jccs rule --show layout_inside_a_function_scope spaces` | Explains one rule (`C-L3`): checks, arguments, examples |
|
|
94
95
|
| `jccs info` | Prints the version, paths and environment |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v2.1.0
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Code: -
|
|
4
4
|
Plans: -
|
|
5
|
-
Checked: 2026-12-
|
|
5
|
+
Checked: 2026-12-04
|
|
6
6
|
|
|
7
7
|
Index of `devs/docs/`. Pages follow `STYLE.md`. Plans (intent and decisions) are in `devs/plans/`.
|
|
8
8
|
|
|
@@ -26,22 +26,23 @@ Index of `devs/docs/`. Pages follow `STYLE.md`. Plans (intent and decisions) are
|
|
|
26
26
|
|
|
27
27
|
## 3. sources
|
|
28
28
|
|
|
29
|
-
| Page | Covers
|
|
30
|
-
|
|
31
|
-
| `sources/README.md` | Top-level modules (`__main__`, `application`, `services`, `constants`, `enums`), map
|
|
32
|
-
| `sources/analysis.md` | Source files, lossless lexer, directives, parser, units, project context
|
|
33
|
-
| `sources/
|
|
34
|
-
| `sources/
|
|
35
|
-
| `sources/
|
|
36
|
-
| `sources/
|
|
37
|
-
| `sources/
|
|
38
|
-
| `sources/
|
|
39
|
-
| `sources/
|
|
40
|
-
| `sources/
|
|
41
|
-
| `sources/
|
|
42
|
-
| `sources/
|
|
43
|
-
| `sources/
|
|
44
|
-
| `sources/
|
|
29
|
+
| Page | Covers |
|
|
30
|
+
|---------------------------|-------------------------------------------------------------------------------------------------------|
|
|
31
|
+
| `sources/README.md` | Top-level modules (`__main__`, `application`, `services`, `constants`, `enums`), map |
|
|
32
|
+
| `sources/analysis.md` | Source files, lossless lexer, directives, parser, units, facts, project context, dependency digest |
|
|
33
|
+
| `sources/cache.md` | Result cache storage: SQLite store, engine fingerprint, diagnostic codec |
|
|
34
|
+
| `sources/cli.md` | Flag and command specs, converters, parser, parsed arguments, help, completion |
|
|
35
|
+
| `sources/configs.md` | Strict INI reader, comment-preserving editor, project configuration |
|
|
36
|
+
| `sources/diagnostics.md` | Diagnostic model, internal codes, fingerprints |
|
|
37
|
+
| `sources/engine.md` | `check_project` phases, plan, runner, scanner, incremental run with the cache, outcome, rule examples |
|
|
38
|
+
| `sources/errors.md` | Exception hierarchy, messages and hints, exit codes, reporting |
|
|
39
|
+
| `sources/fixers.md` | Fix model, fixers, conflicts, verification, passes, diff, writer, journal |
|
|
40
|
+
| `sources/integrations.md` | git, GitHub Actions files, self-update releases, state and installers |
|
|
41
|
+
| `sources/outputs.md` | Report view, renderer registry, text, JSON and schema, JUnit, SARIF, GitHub, HTML |
|
|
42
|
+
| `sources/rules.md` | Rule definitions, `.ini` loader, catalog, primitives catalogue, categories |
|
|
43
|
+
| `sources/selftest.md` | Self-test shipped with the program |
|
|
44
|
+
| `sources/subcommands.md` | Command registry, global actions, `check`, `rule`, `info`, `test`, `update` |
|
|
45
|
+
| `sources/utils.md` | Globs, version constraints, run log, build information, JSON schema validation |
|
|
45
46
|
|
|
46
47
|
## 4. How-to
|
|
47
48
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Code: sources/__init__.py, sources/__main__.py, sources/application.py, sources/services.py, sources/constants.py,
|
|
4
4
|
sources/enums.py
|
|
5
5
|
Plans: devs/plans/01-core-architecture.md, devs/plans/02-cli-specification.md
|
|
6
|
-
Checked: 2026-12-
|
|
6
|
+
Checked: 2026-12-04
|
|
7
7
|
|
|
8
8
|
The top-level modules of `sources/` (the process entry, the seams, the CLI tree, the enums) and the map of its
|
|
9
9
|
packages.
|
|
@@ -117,21 +117,22 @@ bin/jccs or python -m sources
|
|
|
117
117
|
|
|
118
118
|
## 7. Package map
|
|
119
119
|
|
|
120
|
-
| Package | Page | Role
|
|
121
|
-
|
|
122
|
-
| `analysis` | `analysis.md` | Decode, lex and parse C/H files; the
|
|
123
|
-
| `
|
|
124
|
-
| `
|
|
125
|
-
| `
|
|
126
|
-
| `
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
120
|
+
| Package | Page | Role |
|
|
121
|
+
|----------------|-------------------|----------------------------------------------------------------------|
|
|
122
|
+
| `analysis` | `analysis.md` | Decode, lex and parse C/H files; facts; the project context |
|
|
123
|
+
| `cache` | `cache.md` | Result cache: SQLite store, engine fingerprint, diagnostic codec |
|
|
124
|
+
| `cli` | `cli.md` | Flag and command specs, parser, help, shell completion |
|
|
125
|
+
| `configs` | `configs.md` | Strict INI reader and editor, `.JCCS/.jccs.ini` loading |
|
|
126
|
+
| `diagnostics` | `diagnostics.md` | `Diagnostic`, `Location`, fingerprints |
|
|
127
|
+
| `engine` | `engine.md` | `check_project` with result cache: plan, run, outcome; rule examples |
|
|
128
|
+
| `errors` | `errors.md` | `JccsError` hierarchy with hints and exit codes |
|
|
129
|
+
| `fixers` | `fixers.md` | Fix model, fixers, conflicts, verification, journal, writer, diff |
|
|
130
|
+
| `integrations` | `integrations.md` | git, GitHub Actions files, self-update (network) |
|
|
131
|
+
| `outputs` | `outputs.md` | Report renderers (text, json, junit, sarif, github, html) |
|
|
132
|
+
| `rules` | `rules.md` | Rule `.ini` loader, catalog, check primitives, built-in rules |
|
|
133
|
+
| `selftest` | `selftest.md` | Self-test shipped with the program (`jccs test`, `selftest/...`) |
|
|
134
|
+
| `subcommands` | `subcommands.md` | Dispatcher, registry, one package per subcommand |
|
|
135
|
+
| `utils` | `utils.md` | Globs, versions, run log, build information, JSON schema validator |
|
|
135
136
|
|
|
136
137
|
## 8. Invariants and limits
|
|
137
138
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# analysis
|
|
2
2
|
|
|
3
3
|
Code: sources/analysis/
|
|
4
|
-
Plans: devs/plans/04-c-source-analysis.md, devs/plans/01-core-architecture.md
|
|
5
|
-
Checked: 2026-12-
|
|
4
|
+
Plans: devs/plans/04-c-source-analysis.md, devs/plans/01-core-architecture.md, devs/plans/09-performance.md
|
|
5
|
+
Checked: 2026-12-04
|
|
6
6
|
|
|
7
7
|
Reading, tokenising and parsing of the project files, and the in-memory project context every rule receives.
|
|
8
8
|
|
|
9
9
|
## 1. Responsibility
|
|
10
10
|
|
|
11
11
|
`sources/analysis/` turns raw file contents into immutable models: decoded files with lines, a lossless token stream,
|
|
12
|
-
preprocessor directives, an error-tolerant syntax tree per C/H file,
|
|
13
|
-
|
|
12
|
+
preprocessor directives, an error-tolerant syntax tree per C/H file, per-file facts as plain data (`FileFacts`), and
|
|
13
|
+
a `ProjectContext` whose cross-file indexes are built from those facts only.
|
|
14
14
|
|
|
15
15
|
- It MUST depend only on `sources/enums.py` and the standard library. It imports no other JCCS package.
|
|
16
16
|
- It MUST NOT read the disk: callers pass bytes (`sources/engine/scanner.py:load_files` reads them).
|
|
@@ -18,7 +18,8 @@ and a `ProjectContext` with cross-file indexes.
|
|
|
18
18
|
`ERROR` nodes.
|
|
19
19
|
- It knows nothing about rules: no rule, severity or diagnostic type appears here.
|
|
20
20
|
|
|
21
|
-
Consumers: `sources/engine/` (builds the context
|
|
21
|
+
Consumers: `sources/engine/` (builds the context; `sources/engine/incremental.py` caches lexical names and facts and
|
|
22
|
+
keys files with `dependency_digest`), `sources/rules/primitives/` (reads it), `sources/fixers/`
|
|
22
23
|
(re-parses fixed text), `sources/outputs/terminal/renderer.py` (source excerpts), `sources/selftest/cases.py`.
|
|
23
24
|
|
|
24
25
|
## 2. Files
|
|
@@ -32,26 +33,31 @@ Consumers: `sources/engine/` (builds the context), `sources/rules/primitives/` (
|
|
|
32
33
|
| `syntax.py` | `Node`: generic syntax tree node with kind, token span, children and named fields |
|
|
33
34
|
| `parser.py` | `Parser`, `parse_tokens`, `collect_typedef_names`, `is_type_name` |
|
|
34
35
|
| `unit.py` | `CUnit` and its fact records (`FunctionInfo`, `VariableInfo`, ...), `lex_unit`, `build_unit` |
|
|
35
|
-
| `
|
|
36
|
+
| `facts.py` | `FileFacts` and its records, `FACTS_FORMAT`, `extract_facts`, `lexical_typedef_names` |
|
|
37
|
+
| `project.py` | `ProjectContext`, `LazyUnits`, `Located`, `build_project_context`, `DIGEST_VERSION` |
|
|
36
38
|
|
|
37
39
|
## 3. Data flow
|
|
38
40
|
|
|
39
41
|
```text
|
|
40
|
-
{path: bytes}
|
|
42
|
+
{path: bytes}, optional facts and lexical_names by path
|
|
41
43
|
-> project.py:build_project_context
|
|
42
44
|
-> source.py:build_source_file SourceFile (decoded text, lines, kind)
|
|
43
|
-
->
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
-> facts.py:lexical_typedef_names per C/H file without given names:
|
|
46
|
+
unit.py:lex_unit -> lexer.py:tokenize, parser.py:collect_typedef_names
|
|
47
|
+
union of the names ProjectContext.type_names
|
|
48
|
+
-> unit.py:build_unit per C/H file without given facts:
|
|
46
49
|
directives.py:collect_directives / collect_macros / collect_includes
|
|
47
50
|
parser.py:parse_tokens TRANSLATION_UNIT tree + ERROR nodes
|
|
48
51
|
unit.py:_index_tree nodes by kind, function / control / condition spans
|
|
49
52
|
unit.py:_extract_facts functions, prototypes, variables, typedefs, calls, references
|
|
50
|
-
|
|
53
|
+
-> project.py:LazyUnits.store unit kept
|
|
54
|
+
-> facts.py:extract_facts FileFacts
|
|
55
|
+
-> ProjectContext files, lazy units, facts, indexes built from the facts
|
|
51
56
|
```
|
|
52
57
|
|
|
53
58
|
Every file is lexed before any file is parsed, so a file can use a typedef declared in another file
|
|
54
|
-
(`project.py:build_project_context`).
|
|
59
|
+
(`project.py:build_project_context`). Files whose facts are given are not parsed; their unit is built on the first
|
|
60
|
+
`ProjectContext.unit(path)` (section 9.2). `extra_type_names` adds names from outside the given contents; the fix engine
|
|
55
61
|
uses it to re-analyse one file of a larger project (`sources/fixers/engine.py:_single_file`).
|
|
56
62
|
|
|
57
63
|
## 4. Source files
|
|
@@ -132,19 +138,86 @@ nodes and the derived data rules need (storage, parameters, variadic, empty para
|
|
|
132
138
|
|
|
133
139
|
## 9. Project context
|
|
134
140
|
|
|
135
|
-
`project.py:ProjectContext` is the whole project
|
|
136
|
-
and indexes by name built from
|
|
137
|
-
|
|
141
|
+
`project.py:ProjectContext` is the whole project: `files` by relative POSIX path, `units` (`LazyUnits`),
|
|
142
|
+
`type_names`, `facts` (`FileFacts` of every C/H file) and indexes by name built from the facts only.
|
|
143
|
+
|
|
144
|
+
| Index | Value by name |
|
|
145
|
+
|------------------------|-------------------------------------------------------------------|
|
|
146
|
+
| `function_definitions` | `Located[FunctionFact]` tuple |
|
|
147
|
+
| `function_prototypes` | `Located[FunctionFact]` tuple |
|
|
148
|
+
| `calls` | `Located[CallFact]` tuple |
|
|
149
|
+
| `references` | Paths of the files that use the name in an expression, path order |
|
|
150
|
+
| `variables` | `Located[VariableFact]` tuple |
|
|
151
|
+
| `typedefs` | `Located[TypedefFact]` tuple |
|
|
152
|
+
| `macros` | `Located[MacroFact]` tuple |
|
|
153
|
+
| `includes` | By path, not by name: `IncludeFact` tuple of the file |
|
|
154
|
+
|
|
155
|
+
`project.py:Located` pairs a fact with the path of its file (`path`, `item`). Facts carry no path and no line, so a
|
|
156
|
+
primitive that needs a node or a position reads the unit of its own file.
|
|
138
157
|
|
|
139
158
|
Queries for cross-file rules: `file`, `unit`, `files_of_kind`, `function_exists`, `is_called`, `callers`,
|
|
140
|
-
`is_used_outside`, `resolve_include
|
|
159
|
+
`is_used_outside`, `resolve_include` (accepts `Include` and `IncludeFact`), `included_files` (project files included
|
|
160
|
+
directly or through other included files, sorted, the file itself excluded), `dependency_digest`. The context is
|
|
161
|
+
immutable (mapping proxies); a fixed project is a new context. `_memo` keeps derived indexes (files by name, resolved
|
|
162
|
+
includes, name digests) built on first use.
|
|
163
|
+
|
|
164
|
+
### 9.1 Facts
|
|
165
|
+
|
|
166
|
+
`facts.py:FileFacts` is what the cross-file indexes and the `Layer.PROJECT` primitives need from one C/H file:
|
|
167
|
+
`functions`, `prototypes` (`FunctionFact` with `ParameterFact`), `variables` (`VariableFact`), `typedefs`
|
|
168
|
+
(`TypedefFact`), `calls` (`CallFact`: name and caller), `references` (sorted names used in expressions, calls
|
|
169
|
+
included), `macros` (`MacroFact`, body as written), `includes` (`IncludeFact`), `identifiers` (sorted text of every
|
|
170
|
+
identifier token, directives and macro bodies included).
|
|
171
|
+
|
|
172
|
+
- `facts.py:extract_facts` builds them from a `CUnit`; they hold no path, no line number, no node and no token.
|
|
173
|
+
- They depend only on (content of the file, `ProjectContext.type_names`): the same pair always gives the same facts.
|
|
174
|
+
- `FileFacts.to_dict` gives plain JSON data with `"format": FACTS_FORMAT`; `FileFacts.from_dict` rebuilds an equal
|
|
175
|
+
object and raises `ValueError` for malformed data or another format.
|
|
176
|
+
- `facts.py:lexical_typedef_names` gives the typedef names a file declares, from its tokens only; it depends on the
|
|
177
|
+
content only.
|
|
178
|
+
|
|
179
|
+
### 9.2 Lazy units
|
|
180
|
+
|
|
181
|
+
`project.py:LazyUnits` is the `units` mapping. Listing, `len` and `in` parse nothing; `units[path]` (and
|
|
182
|
+
`ProjectContext.unit(path)`) lexes and parses that file with the project typedef names on first access and keeps
|
|
183
|
+
the unit. `build_project_context` stores the units it builds for files without given facts (`LazyUnits.store`), so
|
|
184
|
+
they are never parsed twice. `LazyUnits.built` lists the paths whose unit exists.
|
|
185
|
+
|
|
186
|
+
`build_project_context` parameters:
|
|
187
|
+
|
|
188
|
+
| Parameter | Role |
|
|
189
|
+
|--------------------|--------------------------------------------------------------------------------------------|
|
|
190
|
+
| `contents` | Content of every loaded file, by path |
|
|
191
|
+
| `root` | Display name of the project root |
|
|
192
|
+
| `skipped` | Files listed without content, with the reason |
|
|
193
|
+
| `facts` | Known `FileFacts` by path; MUST come from the same content and the same project type names |
|
|
194
|
+
| `lexical_names` | Known `lexical_typedef_names` by path (same content); other files are lexed |
|
|
195
|
+
| `extra_type_names` | Typedef names declared outside `contents` (re-analysis of one file by the fix engine) |
|
|
196
|
+
|
|
197
|
+
### 9.3 Dependency digest
|
|
198
|
+
|
|
199
|
+
`project.py:ProjectContext.dependency_digest(path)` hashes every cross-file fact a check on `path` may read. It
|
|
200
|
+
starts with `jccs-dependencies`, `DIGEST_VERSION` and the path, then adds:
|
|
201
|
+
|
|
202
|
+
1. for every name in `facts.identifiers` of the file: the hash of every declaration of that name in the project
|
|
203
|
+
(function definitions and prototypes with their parameters, variables, typedefs, macros, each with its file);
|
|
204
|
+
2. for every function and variable the file defines: the hash of every use of that name in the project (each file
|
|
205
|
+
that references it, and each call with its caller);
|
|
206
|
+
3. for every file of `included_files(path)`: its path and the hash of all its facts (`_facts_digest`).
|
|
207
|
+
|
|
208
|
+
The per-name hashes are computed once for the whole project (`_name_digests`). A change in another file changes the
|
|
209
|
+
digest only when it changes a fact about one of these names or an included file. Lines are not facts, so moving code
|
|
210
|
+
in another file changes no digest. A file without facts (not C/H) has a digest of its path only.
|
|
141
211
|
|
|
142
212
|
## 10. Extension points
|
|
143
213
|
|
|
144
214
|
- New syntax construct: a `NodeKind` member in `sources/enums.py`, a `_parse_*` method in `parser.py:Parser`, its
|
|
145
215
|
fields documented in the docstring of that method.
|
|
146
|
-
- New fact: a record class and its extraction in `unit.py:_extract_facts
|
|
147
|
-
`
|
|
216
|
+
- New fact: a record class and its extraction in `unit.py:_extract_facts`. When rules need it across files, a fact
|
|
217
|
+
class and a field in `facts.py:FileFacts` (with `to_dict`, `from_dict`, `extract_facts`), an increase of
|
|
218
|
+
`FACTS_FORMAT`, an index in `project.py:build_project_context`, and its names in `_name_digests` so that
|
|
219
|
+
`dependency_digest` covers it.
|
|
220
|
+
- New dependency rule: `project.py:dependency_digest` and an increase of `DIGEST_VERSION`.
|
|
148
221
|
- New context: a `CodeContext` member and its span in `unit.py:_index_tree` and `CUnit.offset_contexts`.
|
|
149
222
|
|
|
150
223
|
## 11. Invariants and limits
|
|
@@ -154,9 +227,18 @@ INVARIANT: tokenising is lossless; token texts rebuild the decoded text (`JT_ANA
|
|
|
154
227
|
INVARIANT: no function of the package raises on file content; bad input becomes flags, tokens or `ERROR` nodes.
|
|
155
228
|
INVARIANT: offsets and columns count characters of the decoded text (code points), not bytes.
|
|
156
229
|
INVARIANT: models are immutable after `build_project_context`; a rule cannot change what another rule sees.
|
|
230
|
+
INVARIANT: `FileFacts` survive a JSON round trip unchanged (`JT_facts_round_trip`).
|
|
231
|
+
INVARIANT: a context built from given facts gives the same diagnostics as one built by parsing every file
|
|
232
|
+
(`JT_facts_only_context_diagnostics`).
|
|
233
|
+
INVARIANT: with every fact given, `build_project_context` parses nothing, and `unit(path)` parses that file once
|
|
234
|
+
(`JT_facts_lazy_units`).
|
|
235
|
+
INVARIANT: the dependency digest changes when another file changes a fact about a name the file uses, and not when
|
|
236
|
+
it only moves code (`JT_facts_dependency_digest`).
|
|
157
237
|
LIMIT: no preprocessing: macros are not expanded, conditionals are not evaluated, includes are not read.
|
|
158
238
|
LIMIT: a typedef from an unseen header is unknown unless it ends in `_t` or is in `STANDARD_TYPE_NAMES`;
|
|
159
239
|
declarations using it may parse as expressions.
|
|
160
240
|
LIMIT: `CUnit.offset_contexts` scans span lists linearly; cost grows with the number of functions per file.
|
|
161
241
|
LIMIT: only `.c` and `.h` files get a `CUnit`; Makefiles and other files are text only.
|
|
242
|
+
LIMIT: the dependency digest is conservative: any change of a declaration of a name the file writes changes it,
|
|
243
|
+
even when no check reads that declaration (`project.py:dependency_digest`).
|
|
162
244
|
TODO: plan 04 still names tree-sitter (SRC-01) while the code is the hand-written parser; update the plan.
|