Skip to content

Subtree exclude mess in linters and update scripts #17413

@laanwj

Description

@laanwj

For various operations, it is important to exclude subtrees that have imported code:

  • Doxygen: prevent cluttering our documentation with documentation that belongs with that library itself
  • Scripted-diff: commits are not allowed to touch subtrees, this is easy to accidentally do with scripted changes
  • Linters: some linters check policies that do not apply to upstream projects
  • Test coverage: distorts the results; low test coverage of subsidiary libraries does not mean anything

It would be good for consistency, and to reduce developer frustration, for this list to be in one place only, then sourced from where it is needed.

For example, for the crc32c subtree I had to update these places:

  • contrib/devtools/copyright_header.py (EXCLUDE_DIRS)
  • doc/Doxyfile.in (EXCLUDE)
  • test/lint/lint-include-guards.py (EXCLUDE_FILES_WITH_PREFIX)
  • test/lint/lint-includes.py (EXCLUDED_DIRS)
  • test/lint/lint-python-utf8-encoding.py (EXCLUDED_DIRS)
  • test/lint/lint-spelling.py (FILES_ARGS, git ls-files inline)
  • test/lint/lint-whitespace.py (EXCLUDED_DIRS)
  • Makefile.am (LCOV_FILTER_PATTERN)

I'm not yet sure whether I forgot any places (because the excludes are specified in different formats in different places).

Good first issue

The purpose of the good first issue label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase.

Useful skills: shell scripting, python

Want to work on this issue?

You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it.

For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions