Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STYLE: Prefer explicit const designation #5103

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

hjmjohnson
Copy link
Member

Implements detection of local variables which could be declared as const but are not. Declaring variables as const is recommended by many coding guidelines, such as: ES.25 from the C++ Core Guidelines.

cd ${BLDDIR}
run-clang-tidy.py -extra-arg=-D__clang__ -checks=-,misc-const-correctness -header-filter=. -fix

PR Checklist

Implements detection of local variables which could be declared as const but
are not. Declaring variables as const is recommended by many coding
guidelines, such as: ES.25 from the C++ Core Guidelines.

cd ${BLDDIR}
run-clang-tidy.py -extra-arg=-D__clang__ -checks=-*,misc-const-correctness -header-filter=.* -fix
@hjmjohnson hjmjohnson self-assigned this Dec 22, 2024
@github-actions github-actions bot added type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Core Issues affecting the Core module area:IO Issues affecting the IO module type:Style Style changes: no logic impact (indentation, comments, naming) type:Design Improvement in the design of a given area area:Numerics Issues affecting the Numerics module labels Dec 22, 2024
@hjmjohnson
Copy link
Member Author

/azp run ITK.macOS

@hjmjohnson hjmjohnson requested a review from dzenanz December 24, 2024 14:35
@dzenanz dzenanz merged commit ab16e66 into master Dec 27, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Core Issues affecting the Core module area:IO Issues affecting the IO module area:Numerics Issues affecting the Numerics module type:Design Improvement in the design of a given area type:Style Style changes: no logic impact (indentation, comments, naming) type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants