Comments (2)
Of course it is a good idea to enable code analysis.
But still, the code analysis can warn or give suggestions. Often the warnings are a good idea, but sometimes they are false warnings. Meaning, we should not blindly trust the code analysis like lemmings.
If working on a issue and testing it, then the analysis and warnings of this code should be fixed or evaluated by the programmer.
But we should not turn on code analysis, and then also turn on TreatWarningsAsError, which then forcues us to change all the code across all the project.
from fo-dicom.
Of course it is a good idea to enable code analysis.
But still, the code analysis can warn or give suggestions. Often the warnings are a good idea, but sometimes they are false warnings. Meaning, we should not blindly trust the code analysis like lemmings. If working on a issue and testing it, then the analysis and warnings of this code should be fixed or evaluated by the programmer.
But we should not turn on code analysis, and then also turn on TreatWarningsAsError, which then forcues us to change all the code across all the project.
In general my experience with Microsoft.CodeAnalysis is that they are quite conservative, and safe to apply. If we disagree with a specific warning, or if it would introduce too much work, we can disable them (and I have already done so a few times in my PR).
You can configure the severity level of each rule separately in .editorconfig. I have set everything in the "reliability" and "performance" category to "Warning" for now, since these are important aspects of a library. For example, "ConfigureAwait" is only a suggestion by default, but as you have experienced, they can cause quite some trouble.
The other rules are still set to their default values.
If you have some time, please look at some of the changes I made with the currently activated set of rules. Please say so if disagree with some of them. I made separate commits per rule, so it is just a matter of reverting the commit and changing the severity of the rule.
from fo-dicom.
Related Issues (20)
- Incorrect conversion between C# decimal and DICOM Decimal String HOT 1
- ISO 2022 IR 58 Encoded Strings Cannot Be Decoded Correctly HOT 3
- Performance impact in DicomDataset comparing HOT 7
- What is the plan for supporting .NET 8? HOT 4
- Ability to cancel the store request in C-Get HOT 2
- Add support for parsing DICOM files where the pixel data is not properly closed with a SequenceDelimitationItem HOT 3
- Provide a "hook" that delegates encoding/decoding of "text" to the user HOT 2
- DICOM The printout is coming out blank. HOT 2
- DicomValidation for VR PN Length HOT 4
- Strong-name key is not protected HOT 4
- Unable to load DLL Dicom.Native.dll with .Net Framework 4.7.2 HOT 12
- Web application builder use SkipValidation() HOT 3
- DllNotFoundException Dicom.Native fo-dicom 5.1.1 fo-dicom.Codecs 5.10.6 HOT 1
- GrayscaleRenderOptions.FromDataset crashes from 5.1.3 HOT 3
- The C:\Windows\SystemTemp Becomes Full and Is Not Cleared
- C-Echo request exception with printer in 5.0.3 version HOT 1
- How to correctly implement Presentation Contexts Negotiation HOT 4
- During RenderImage "Index was outside the bounds of the array." is thrown HOT 6
- DicomDataset.GetDicomItem should return null when private tag is not found but throws exception HOT 3
- MemoryByteBuffer.GetByteRange, Source array was not long enough HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fo-dicom.