Set BUILD_VERSION to the content of the version descriptor (version.txt)
if it changed in the last commit, assuming that the last commit was a
release preparation commit that updated the version descriptor.
Close#4928
- Remove test leftovers before initializing the workspace
against which fix mode tests run. This prevents ownership issues.
- Pass container image build metadata as outputs of the container image
build job so we can include the validate-container-image-labels target
as other test target when we build the test matrix.
- Manually include the 'test' target when building the test suite matrix
so we run it as part of the test suite to ensure that tests don't
pollute each other's working directory.
Fix#5994
- Add missing fix mode options for: CLANG_FORMAT, ENV,
GOOGLE_JAVA_FORMAT, NATURAL_LANGUAGE, PYTHON_ISORT, RUST_CLIPPY.
- Refactor linter tests to make them shorter because there's no need to
have big test files.
- Refactor 'bad' linter tests for linters that support fix mode so they
contain only automatically fixable issues. This is needed to avoid
adding another set of 'bad' linter tests for fix mode.
- Provide configuration files for linters that support fix mode and for
which the default configuration is not suitable to enable fix mode:
ansible-lint, ESLint, golangci-lint.
- Add a test case for linter commands options for linters that support
fix mode, to ensure that fix mode and check-only mode options have
been defined.
- Refactor the fix mode test to check if linters actually applied
modifications to files.
- Update documentation about adding test cases for linters that support
fix mode.
- Don't exit with a fatal error if VALIDATE_xxx is false when testing
fix mode because not all linters support fix mode. To enable this, set
the new FIX_MODE_TEST_CASE_RUN variable to true.
Renovate has an optional requirement for the RE2 package, and will warn if
it is not present.
Setting env variable RENOVATE_X_IGNORE_RE2=true will hide this warning.
(see https://github.com/renovatebot/renovate/pull/21391)
Remove the H1 heading from the PR template because GitHub automatically
add the commit description before emitting the PR template, so
contributors don't have to manually cut-paste the commit description
after the H1 heading.
Bind-mount the whole lib directory as /action/lib in the
devcontainer so we don't have to manually add lib
subdirectories to the devcontainer configuration as we create
them.
Certain linters and formatters support fixing linting and formatting
issues (fix mode). Before this change, Super-linter runs linters and
formatters in a mode that doesn't modify the source code in any way
(check only mode).
With this change, Super-linter supports running linters and formatters
in fix mode if explicitly requested by the configuration. If the
configuration includes a variable named FIX_<language_name>,
Super-linters modifies the command to run the linter or formatter for
<language_name> to enable fix mode.
The modifications to the linter or formatter command that Super-linter
applies depend on what is the default for a particular linter: it either
removes or adds options to the command to run the linter or formatter.
Add the --gitignore option to LINTER_COMMANDS_ARRAY_JSCPD when
IGNORE_GITIGNORED_FILES=true. Users can also set the gitignore options
in the Jscpd configuration file, but with this change we make Jscpd
automatically respecting that.
Remove clippy.sh script and run cargo-clippy directly. The script was
needed because when we introduced cargo-clippy, Super-linter didn't have
a way to customize the working directory when running linters and
formatters. Now, we can use GNU Parallel to handle that case.
This will unblock the work to do to implement #4001 (pass custom options
to cargo-clippy).
- When a commit is a merge commit, adjust the revision so that it
selects the correct parent.
- Add relevant tests.
- Extract the logic to initialize a Git repository for tests in a
dedicated function.
Fix#5941
Move LANGUAGE_ARRAY definition and initialization to a dedicated file
(globals/languages.sh) so we can source it in different places without
having to source the whole linter.sh
-re-instates previous super-linter pylint functionality
-ignoring import errors is desired as super-linter does not
support installing dependencies as it runs
-creates a new test case file for confirming
import-errors are disabled this consists of a 3rd
party import and a basic usage
- Remove the previous summary file is present to avoid showing stale
contents from old summaries.
- Extract the logic to write summary heading and lines to dedicated
functions in output.sh to make it easier adding new formats in the
future.
- Store Super-linter outputs in the main output directory.
- Update README with a few fixes and details about outputs.
- Add missing test cases for when the configuration didn't enable any
output.
Move internal-facing dependency updates out of the main changelog:
- Categorize GitHub Actions and dev dependency updates under the 'ci'
prefix.
- Categorize devcontainers updates under the 'chore' prefix.
- Allow using both Prettier and StandardJS at the same time by removing
JAVASCRIPT_DEFAULT_STYLE and TYPESCRIPT_DEFAULT_STYLE
configuration variables. They create a confusing corner case that
Super-linter already handles with its core logic that's in place to
enable and disable linters.
- Document VALIDATE_JAVASCRIPT_PRETTIER and VALIDATE_TYPESCRIPT_PRETTIER
because they were missing from the README.
- Add missing TYPESCRIPT_PRETTIER tests.