-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Coding style, static code analysis, and versioning #249
Comments
Hi @Corniel, thank you very much for contributing, I’m very happy! Framework version and Language version.NET 8.0 and language 12.0 WarningAsErrorI also agree that it's not interesting. Static code analysis
EditorconfigI see sense in all the items and changing the editor.config RCS1008I also don't like RCS1008, I understand we can change it, but I don't believe it would be a priority asap like the .NET version. PRI've already seen your PR and didn't find any points of attention, thank you very much ❤️ . I would like to download your branch locally and do some tests to try to identify possible break changes (I can't measure how faithful the tests are to identify possible problems when changing the .NET version). |
Hello @daveaglick, about dotnet version updates, do you remember anything relevant that we should look at? |
Not really, just that I'm slow at them :) The one part to watch out for is Buildalyzer.Logger. Since that gets injected into the build to be analyzed as a MSBuild logger, and different MSBuild version have some subtle breaking changes in terms of methods moving around and stuff, I generally try to keep that one as low a target as possible. That can get tricky though because it also needs to reference That said, Buildalyzer itself (the library that consumers call and use) isn't so tied so it can increment the build target a bit more easily. |
Thank you very much, I will try to do some tests following the instructions(Buildalyzer.Logger). |
The cost is low, if you might wonder. Ideally, a library like Buildalizer should mainly contain
Also low costs. QW0003 also comes with a code fix, so sealing classes is just a
Well, I did not change any package of the assemblies shipped, and I suggest not to do that for that PR anyway. |
A thing that I forgot to mention, but I think is worth enabling, is |
Hello @Corniel, I was just running your branch locally, apparently everything works perfectly. |
@daveaglick |
Yeah, it scared me, but mostly because of my lack of time to troubleshoot if something went sideways once released. Probably not a bad idea to bump that one given how old it is once you've got a good handle on any risks and do some more testing. |
@Corniel .NET version merged. |
@phmonte I would argue that there is no hurry in pushing a new version. The only difference is the extra .NET 8 target. |
@Corniel I saw that there are some changes you want to make, are there any more besides the open PRs? |
@phmonte I would like to slowly move forward. But all with baby steps. |
@Corniel are there any more questions? If not, I'll close this issue. |
Yes, the static code analysis warnings should still be further revisited if you ask me. |
Framework version
The current target framework is .NET 6. Its support will be dropped end of this year. I would suggest to add .NET 8 asap, and drop .NET 6 support at the moment a breaking change has to be made.
Language version
The current language version is 10. I hope we can upgrade to C# 12. There are so many nice features that could be benefited from.
Warning as error
In the build properties,
WarningAsError
has been set totrue
. Although I understand the reasoning of that setting, I strongly believe that is counter productive. You want to be notified that you have aTODO
, but it should not make you build fail. Without changing theWarningAsError
locally, I can not even build the current solution, as my IDE (Visual Studio) triggers some external analyzers (including a spelling checker) that result in build errors.Static code analysis
I would love to add:
Editorconfig
The readability of the editor config can improved by adding a comment about the rule behind its definition. Most people - me included - do not now the identifiers of those analyzers by hart.
As a side note, I personally really dislike RCS1008, as using
var
helps keeping code short and aligned. Can this be reconsidered?Long story short, I love this project, and would like to keep participating. I think that this suggestions could make working with it even better.
The text was updated successfully, but these errors were encountered: