diff --git a/.github/workflows/build+test+deploy.yml b/.github/workflows/build+test+deploy.yml index 677ccbce6..c63045fe2 100644 --- a/.github/workflows/build+test+deploy.yml +++ b/.github/workflows/build+test+deploy.yml @@ -27,8 +27,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Restore tools - run: dotnet tool restore - name: Restore dependencies run: dotnet restore - name: Build diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d44888ed..f52622ec9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,8 +11,6 @@ Use the issues tracker for: * [feature requests](#feature-requests) * [submitting pull requests](#pull-requests) -Please **do not** use the issue tracker for personal or commercial support requests. - ## Bug reports A bug is either a _demonstrable problem_ that is caused by the code in the repository, @@ -143,3 +141,8 @@ in order to craft an excellent pull request: git checkout git rebase master ``` + +## Maintaining the project + +If you have become a maintainer, please don't forget to follow [the Releasing Guidelines](./RELEASE.md). + diff --git a/README.md b/README.md index 3668e982e..65dc0d659 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ FSharpLint is a static analysis tool for F#. Like many other software linters, it analyzes your source code (using both typed and untyped syntax trees) and highlights any violations of defined F# coding rules. There are various kinds of rules: -* **Conventions:** ensures that your API members follow project- or solution-wide naming conventions. -* **Smells:** warns about logic that may pose maintainability problems or potential downsides. -* **Formatting:** checks that code is indented and structured according to specified cosmetic standards. +* **Conventions:** ensures that your API members follow project- or solution-wide naming standards, or that your source code is structured in parts that don't surpass excessive (and configurable) certain lengths. +* **Smells:** warns about logic that may indicate defects, or pose maintainability problems or downsides. +* **Formatting:** checks that code is indented and structured according to specified cosmetic standards (beware, this kind of rules are deprecated in favour of more mature tools such as `fantomas`). The tool is configurable via JSON and can be run as a console app or as an MSBuild task. It also provides an interface for easy integration into other software. @@ -38,24 +38,19 @@ Package | Version ## How to build 1. Make sure you've installed the .NET version defined in [global.json](global.json) -2. Run `dotnet tool restore` to install all developer tools required to build the project -3. Run `make` to build (which executes the `Build` target from the FAKE-based [build script](build.fsx)) -4. To run tests use `make check` -5. To build documentation use `make docs` +2. Run `make` to build (which executes the `Build` target from the FAKE-based [build script](build.fsx)) +3. To run tests use `make check` +4. To build documentation use `make docs` ## How to work with documentation 1. Make sure you've installed the .NET version defined in [global.json](global.json) 2. Run `dotnet tool restore` to install all developer tools required to build the project -3. Run `dotnet fsi build.fsx` to build default target of [build script](build.fsx) -4. Build documentation to make sure everything is fine with `dotnet fsi build.fsx -t Docs` +3. Run `make` to build the default target of the [build script](build.fsx) +4. Build documentation to make sure everything is fine with `make docs` 5. Go to docs folder `cd docs` and start Fornax in watch mode `dotnet fornax watch` 6. Your documentation should be now accessible on `localhost:8080` and will be regenerated on every file save -## How to release - -Please [read the Releasing Guidelines](./RELEASE.md) if you're a maintainer. - ## How to contribute Bug reports, feature requests, and pull requests are very welcome! Please [read the Contribution Guidelines](./CONTRIBUTING.md) diff --git a/src/FSharpLint.Core/FSharpLint.Core.fsproj b/src/FSharpLint.Core/FSharpLint.Core.fsproj index 84c12c435..ab99967f5 100644 --- a/src/FSharpLint.Core/FSharpLint.Core.fsproj +++ b/src/FSharpLint.Core/FSharpLint.Core.fsproj @@ -43,10 +43,10 @@ - + - + @@ -57,17 +57,17 @@ - + - - - - - - - - + + + + + + + + @@ -116,13 +116,13 @@ - - - - - - - + + + + + + + diff --git a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithBadUsage.fs b/src/FSharpLint.Core/Rules/Conventions/FailwithBadUsage.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithBadUsage.fs rename to src/FSharpLint.Core/Rules/Conventions/FailwithBadUsage.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/AvoidTooShortNames.fs b/src/FSharpLint.Core/Rules/Conventions/Naming/AvoidTooShortNames.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/AvoidTooShortNames.fs rename to src/FSharpLint.Core/Rules/Conventions/Naming/AvoidTooShortNames.fs diff --git a/src/FSharpLint.Core/Rules/Typography/MaxLinesInFile.fs b/src/FSharpLint.Core/Rules/Conventions/SourceLength/MaxLinesInFile.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Typography/MaxLinesInFile.fs rename to src/FSharpLint.Core/Rules/Conventions/SourceLength/MaxLinesInFile.fs diff --git a/src/FSharpLint.Core/Rules/Formatting/TypePrefixing.fs b/src/FSharpLint.Core/Rules/Conventions/TypePrefixing.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Formatting/TypePrefixing.fs rename to src/FSharpLint.Core/Rules/Conventions/TypePrefixing.fs diff --git a/src/FSharpLint.Core/Rules/Typography/Indentation.fs b/src/FSharpLint.Core/Rules/Formatting/Typography/Indentation.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Typography/Indentation.fs rename to src/FSharpLint.Core/Rules/Formatting/Typography/Indentation.fs diff --git a/src/FSharpLint.Core/Rules/Typography/MaxCharactersOnLine.fs b/src/FSharpLint.Core/Rules/Formatting/Typography/MaxCharactersOnLine.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Typography/MaxCharactersOnLine.fs rename to src/FSharpLint.Core/Rules/Formatting/Typography/MaxCharactersOnLine.fs diff --git a/src/FSharpLint.Core/Rules/Typography/NoTabCharacters.fs b/src/FSharpLint.Core/Rules/Formatting/Typography/NoTabCharacters.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Typography/NoTabCharacters.fs rename to src/FSharpLint.Core/Rules/Formatting/Typography/NoTabCharacters.fs diff --git a/src/FSharpLint.Core/Rules/Typography/TrailingNewLineInFile.fs b/src/FSharpLint.Core/Rules/Formatting/Typography/TrailingNewLineInFile.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Typography/TrailingNewLineInFile.fs rename to src/FSharpLint.Core/Rules/Formatting/Typography/TrailingNewLineInFile.fs diff --git a/src/FSharpLint.Core/Rules/Typography/TrailingWhitespaceOnLine.fs b/src/FSharpLint.Core/Rules/Formatting/Typography/TrailingWhitespaceOnLine.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Typography/TrailingWhitespaceOnLine.fs rename to src/FSharpLint.Core/Rules/Formatting/Typography/TrailingWhitespaceOnLine.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/AsyncExceptionWithoutReturn.fs b/src/FSharpLint.Core/Rules/Smells/AsyncExceptionWithoutReturn.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/AsyncExceptionWithoutReturn.fs rename to src/FSharpLint.Core/Rules/Smells/AsyncExceptionWithoutReturn.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithWithSingleArgument.fs b/src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/FailwithWithSingleArgument.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithWithSingleArgument.fs rename to src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/FailwithWithSingleArgument.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithfWithArgumentsMatchingFormatString.fs b/src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/FailwithfWithArgumentsMatchingFormatString.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/FailwithfWithArgumentsMatchingFormatString.fs rename to src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/FailwithfWithArgumentsMatchingFormatString.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/InvalidArgWithTwoArguments.fs b/src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/InvalidArgWithTwoArguments.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/InvalidArgWithTwoArguments.fs rename to src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/InvalidArgWithTwoArguments.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/InvalidOpWithSingleArgument.fs b/src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/InvalidOpWithSingleArgument.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/InvalidOpWithSingleArgument.fs rename to src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/InvalidOpWithSingleArgument.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/NullArgWithSingleArgument.fs b/src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/NullArgWithSingleArgument.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/NullArgWithSingleArgument.fs rename to src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/NullArgWithSingleArgument.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/RaiseWithSingleArgument.fs b/src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/RaiseWithSingleArgument.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/RaiseWithSingleArgument.fs rename to src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/RaiseWithSingleArgument.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/RaiseWithTooManyArgumentsHelper.fs b/src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/RaiseWithTooManyArgumentsHelper.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/RaiseWithTooManyArguments/RaiseWithTooManyArgumentsHelper.fs rename to src/FSharpLint.Core/Rules/Smells/RaiseWithTooManyArguments/RaiseWithTooManyArgumentsHelper.fs diff --git a/src/FSharpLint.Core/Rules/Conventions/UsedUnderscorePrefixedElements.fs b/src/FSharpLint.Core/Rules/Smells/UsedUnderscorePrefixedElements.fs similarity index 100% rename from src/FSharpLint.Core/Rules/Conventions/UsedUnderscorePrefixedElements.fs rename to src/FSharpLint.Core/Rules/Smells/UsedUnderscorePrefixedElements.fs