Comments (6)
I highly recommend that if we do this, we do it by adding the StyleCopAnalyzers analyzer to the project. It will both check style and offer to correct violations easily, efficiently, and (perhaps most importantly) accurately. It does not require the installation of 3rd-party extensions to Visual Studio, and it does not require the user modify their Visual Studio settings to match those of the project.
I recently added targeted support for certain alternative naming conventions and rules for the use of curly braces. If you are interested in looking into this approach as a possibility, my suggestion would be to first review the StyleCop rules and provide feedback on any rules which you foresee as a problem. For those rules, if StyleCopAnalyzers has an alternative available we can use that instead.
from codecontracts.
I'm ok with that, but I think the very first thing is to run https://github.com/dotnet/codeformatter to get this code readable. Tools for forcing this rules are super useful, but review process could mitigate this. Right now it is very inconvenient to make any fixes here.
from codecontracts.
I haven't used that tool; I'm not opposed to it as the first step.
I would prefer the rewrite not touch the Visual Studio extension code, as that would invalidate much of the work I've been doing. Or delay the rewrite until after I get that pull request submitted.
from codecontracts.
I would prefer the rewrite not touch the Visual Studio extension code, as that would invalidate much of the work I've been doing.
Even more, maybe it would be better to fix VS14 first and only after that clean-up this stuff.
from codecontracts.
It's a no-brainer to take care of formatting for some items at the time they are added, such as the files that will be added to resolve #6. For the others, it's probably best to put a feeler out regarding any ongoing work, announce the intent to format a particular project in X days, and then if no one objects for outstanding work do the reformat. X=3 is likely to work well for people who are in different time zones and may have different weekend days.
from codecontracts.
The reformat should be committed with the author manually set to either @FrancescoLogozzo, @dotnet-bot, or similar in order to make sure that the entire code base isn't "hijacked" by one of the new participants. 😄
📝 I'm not saying @FrancescoLogozzo is a bot. I included these two because @FrancescoLogozzo currently "owns" the entire code according to git blame, and included @dotnet-bot because this is the user assigned to commits like this for projects like coreclr, corefx, and roslyn.
from codecontracts.
Related Issues (20)
- Rewriter produces incorrect debug information for async methods in PDB file HOT 1
- Removing Code Contracts from a project when upgrading to VS2017 HOT 1
- Rosalyn Code Analyzer for Code Contracts Usage HOT 4
- .NET Framework 4.7 BCL Contracts
- ccrewrite aborted due to metadata errors (Xamarin or VS2017 15.2 related?)
- StackOverflowException in cccheck.exe
- IDictionary contracts and boxing HOT 2
- Postcondition missing from StringBuilder.AppendFormat(IFormatProvider, string, object)
- How to enable "perform runtime contract checking" in Visual Studio 2017? HOT 19
- Do not work with visual studio 2017 HOT 6
- COMException (0x80004005)
- Build with CodeContracts fails with dotnet build
- Document for the implementation/source code?
- Another NullReferenceException with closure in constructor
- VS2017 path to sn.exe is wrong
- Reading assembly 'Unity.Abstractions' generate System.OutOfMemoryException HOT 1
- BadImageFormatException with enabled runtime checking
- Rewrite tool introduce bugs in local functions
- Preconditions with non-interger decimals are broken
- Enable contracts in VS Community 2019
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 codecontracts.