digitecgalaxus / projectsruler Goto Github PK
View Code? Open in Web Editor NEWThis is a C# Project for architectural governance. It checks the .csproj and .sln files and can be used to implement some rules upon them.
License: MIT License
This is a C# Project for architectural governance. It checks the .csproj and .sln files and can be used to implement some rules upon them.
License: MIT License
To prevent accidents, only safe changes should be incorporated into master. To do this, a pipeline should exist that reacts on pushes on pull requests and verifies that they can be safely merged.
While it's perfectly fine to create rules using only the constructor, it might be beneficial to allow a more fluent style for creating rules. Something like
Rule.CreateRule("This is a description")
.For("Package.A")
.Referencing("Package.A.Contracts")
.Kind(RuleKind.Forbidden)
Obviously, the names are up to debate. I myself prefer a sentence-like style, e.g. "Check that package X does not reference package Y" translated as
Check("Description")
.That("Package.A")
.DoesNotReference("Package.B")
but that is just personal preference.
As a developer I want to make sure that only the intended .props files are used in the .csproj files.
Duplicates can sometimes make a lot of small problems while compiling, if you do a clean compile/rebuild of the solution. This could easily be checked with the ProjectsRuler.
If a tag is created, that commit will be used to build a NuGet package, which will then be published to nuget.org via actions.
I dig fluent interfaces. There now is a fluent builder for rules, but I feel like the checking in general could be done via a fluent interface.
In my mind, it'd be like
var violations = ForProject("path/to/sln").Check()
.That.Project("SomeCoolProject").DoesNotReference("*Test")
.That.AllProjects.Import("Common.props")
.That.Project("*.Database").DoesNotReference("*").Except("EF.Core")
.Result()
This would allow different kinds of checks to weave together... instead of checking "horizontally" - e.g. all references, all duplicates, ... - you could check "vertically" for projects or layers.
Of course, actual names are subject for debate ๐
It is possible to check an exact version only. e.g. Version=="1.1.1"
Base.A -> Base.A.Contracts OK
Base.A.Contracts -> Base.A not OK
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.