-
Notifications
You must be signed in to change notification settings - Fork 34
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
Build: Common Nimble Hints #1514
Comments
Thank you for the report. |
Thank you for your answer. I will begin to remove the obsolete conversions and redundant imports. As soon as I finished these adjustments, I will submit a new Pull Request. |
Most of the duplicate imports are seem to be caused by the inclusion of the respective source files to be tested. |
Solved by #1604. |
When working on #1513, I had a look at the output of the CI. The step "unit test" of the job "build ubuntu-latest" (
test.yaml
) generates various hints on style issues Nimble finds.Here is an overview about common categories:
[ConvFromXtoItselfNotNeeded]
[DuplicateModuleImport]
[Name]
[XCannotRaiseY]
[XDeclaredButNotUsed]
The unit test generates more than 8000 lines of output, so I picked the most frequently appearing categories, for the beginning. Some points, like inconsistent spacing, are rather simple to fix and were only rarely reported in the CI's output.
The naming convention hints mostly concern the colours, but also other symbols in the code, such as the options for compilers (
ClangOptions
→clangOptions
, for example). Since most of the hints Nimble generates are related to the naming conventions, I would like to suggest to defer the adjustment to dedicated enhancements of the concerning components and major refactorings, respectively, for example #1483, as the reason for the choice of a symbol's name for sure is more important than the respective naming convention being fulfilled in mostly any case. However, an adjustment would be a meaningful change in the long term as the compliance to the common conventions of the language is a sane goal, in my opinion.The obsolete conversions and redundant imports are rather easy to fix, I assume that especially the removal of the casts would lead to some performance benefits. Again, often the colour management was affected.
Regarding the declared but unused symbols as well as the information that some procedures cannot raise certain exceptions I am unsure which of those points might belong to a long-term feature introduction and / or maintenance. Here, it should be discussed which changes can be made without breaking pending Pull Requests. Mostly,
b2Mask
,b3Mask
, andb4Mask
were flagged declared but never used;parse
cannot raiseDefect
.I would like to discuss how these points should be prioritised and which issues should be worked on first.
The text was updated successfully, but these errors were encountered: