Skip to content
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

Adds various new conventions #89

Merged

Commits on Jan 6, 2024

  1. [andrewabestGH-87] Added new (Cecil based) convention to check that c…

    …ode doesn't directly call Guid.NewGuid()
    
    A possible use-case is code written in a functional style (that wants to avoid non-deterministic behaviour)
    eddie.stanley committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    4239440 View commit details
    Browse the repository at this point in the history
  2. [andrewabestGH-87] Added new convention to check that an assembly is …

    …included (by name) in a haystack set of assemblies
    
    This can be used to ensure a list of assemblies (e.g. those containing "production code") is kept up-to-date *so that you can apply conventions to the types in those assemblies*.
    eddie.stanley committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    4a96fd6 View commit details
    Browse the repository at this point in the history
  3. [andrewabestGH-87] Added new convention to enforce that a given proje…

    …ct doesn't include project references to (any) other projects
    eddie.stanley committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    740a4d3 View commit details
    Browse the repository at this point in the history
  4. [andrewabestGH-87] Added new conventions to enforce that a project re…

    …ferences/does not reference a package (by name)
    
    An example use-case is something like the coverlet collector (https://github.com/coverlet-coverage/coverlet) which should be added ONLY to (ALL) test projects
    
    - Added new SDK-style project & bumped project count
    eddie.stanley committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    6bc3176 View commit details
    Browse the repository at this point in the history
  5. [andrewabestGH-87] Added convention to enforce a project file sets a …

    …property
    
    Some examples:
    - Convention.MustSetPropertyValue("Nullable", "enable") // Ensure nullable types are enabled for the project
    - Convention.MustSetPropertyValue("IsPackable", "true") // Ensure the project can be packed for NuGet
    
    See https://learn.microsoft.com/en-us/visualstudio/msbuild/property-element-msbuild?view=vs-2022#example
    eddie.stanley committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    d77cd18 View commit details
    Browse the repository at this point in the history
  6. [andrewabestGH-87] Added convention to enforce a project file treats …

    …a given compiler warning as an error
    eddie.stanley committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    f5a4b38 View commit details
    Browse the repository at this point in the history