T O P I C R E V I E W |
FriendlyRabbit |
Posted - Nov 01 2023 : 03:32:20 AM Are there any plans do support checking and enforcing naming conventions? Some code inspections go in that direction, but there is no exhausting solution.
I am asking for something similar to this, where you can configure naming conventions for certain types of symbols. https://www.jetbrains.com/help/resharper/Coding_Assistance__Naming_Style.html |
7 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Apr 02 2024 : 10:33:46 AM Thank you for the vote of interest. This is definitely something we are looking into, so hopefully we will have something fairly soon. |
mariahcarey |
Posted - Apr 01 2024 : 03:18:51 AM quote: Originally posted by feline
No particular current plans, partly because this is something so very individual, so would require a lot of options to work well.
Having said that, clang-tidy does have this check:
https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html https://mapsdrivingdirections.io
which you can enable if you tell VA to show you Unevaluated Checkers in code inspection. But without the ability to set all of the options for this check, you are going to need to rely on the defaults matching what you want to do.
I have put in a feature request to support this checker, and also allowing you to set all of the options. Given the number, it could be that is better done via a text file of some sort, rather than a GUI.
case=153852
Thank you! While it may not offer as extensive customization options as ReSharper's naming style, it can still be a valuable tool for enforcing naming conventions in your codebase. |
feline |
Posted - Nov 08 2023 : 05:35:05 AM I can definitely see this being popular, I am just not looking forward to trying to understand how all the settings are going to interact for this one |
FriendlyRabbit |
Posted - Nov 07 2023 : 08:35:57 AM Looking forward to that solution. Being able to access the whole configuration of these checkers gives me full control while saving you from the work of creating a GUI for every single one. Can't wait for this feature :-) |
feline |
Posted - Nov 07 2023 : 08:33:04 AM The text field per code inspection actually makes a lot more sense, I have put a note on the case about this. It seems a reasonable approach, and will work well when we have several different checks that all have complex options, which is bound to happen with time.
As for the forum timezone, the settings says it is using zero hours of adjustment from the server timezone. So, nice and clear there -4 from UTC seems to be Atlantic Standard Time, based on this page:
https://www.timeanddate.com/time/zones/ |
FriendlyRabbit |
Posted - Nov 02 2023 : 02:53:03 AM Thank you for mentioning this check, I have not yet noticed it. This is exactly the feature I am looking for. However, the default configuration seems to do nothing at all.
I noticed that it is possible to configure the clang-tidy checks with some JSON text "CheckOptions", see below. I wonder if you can provide a simple text entry field for each unevaluated code inspection. This would allow me to configure them using the same syntax as in the command line (see below) and to customize them to my liking without requiring you to support them one by one. What do you think about it?
clang-tidy.exe -config="{Checks: '-*,readability-identifier-naming', CheckOptions: [ {key: readability-identifier-naming.ClassCase, value: CamelCase} ]}" test.cpp -- -std=c++11
https://stackoverflow.com/questions/51711435/clang-tidy-ignores-readability-identifier-naming-on-windows
Offtopic: The clock in the forum seems to be off. I am editing this file on 9:29 UTC time but is says 5:29. Which timezone is that? |
feline |
Posted - Nov 01 2023 : 10:13:56 AM No particular current plans, partly because this is something so very individual, so would require a lot of options to work well.
Having said that, clang-tidy does have this check:
https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html
which you can enable if you tell VA to show you Unevaluated Checkers in code inspection. But without the ability to set all of the options for this check, you are going to need to rely on the defaults matching what you want to do.
I have put in a feature request to support this checker, and also allowing you to set all of the options. Given the number, it could be that is better done via a text file of some sort, rather than a GUI.
case=153852 |
|
|