Releases: rhysd/actionlint
Releases · rhysd/actionlint
v1.4.0
- New rule to validate glob pattern syntax to filter branches, tags and paths. For more details, see documentation.
- syntax errors like missing closing brackets for character range
[..]
- invalid usage like
?
following*
, invalid character range[9-1]
, ... - invalid character usage for Git ref names (branch name, tag name)
- ref name cannot start/end with
/
- ref name cannot contain
[
,:
,\
, ...
- ref name cannot start/end with
- syntax errors like missing closing brackets for character range
- Fix column of error position is off by one when the error is caused by quoted strings like
'...'
or"..."
. - Add
--norc
option toshellcheck
command to check shell scripts inrun:
in order not to be affected by any user configuration. - Improve some error messages
- Explain playground in
man
manual
v1.3.2
- actionlint playground was implemented thanks to WebAssembly. actionlint is now available on browser without installing anything. The playground does not send user's workflow content to any remote server.
- Some margins are added to code snippets in error message. See below examples. I believe it's easier to recognize code in bunch of error messages than before.
- Line number is parsed from YAML syntax error. Since errors from go-yaml/go don't have position information, previously YAML syntax errors are reported at line:0, col:0. Now line number is parsed from error message and set correctly (if error message includes line number).
- Code snippet is shown in error message even if column number of the error position is unknown.
- Fix error message on detecting duplicate of step IDs.
- Fix and improve validating arguments of
format()
calls. - All rule documents have links to actionlint playground with example code.
man
manual covers usage of actionlint on CI services.
Error message until v1.3.1:
test.yaml:4:13: invalid CRON format "0 */3 * *" in schedule event: Expected exactly 5 fields, found 4: 0 */3 * * [events]
4| - cron: '0 */3 * *'
| ^~
Error message at v1.3.2:
test.yaml:4:13: invalid CRON format "0 */3 * *" in schedule event: Expected exactly 5 fields, found 4: 0 */3 * * [events]
|
4 | - cron: '0 */3 * *'
| ^~
v1.3.1
- Files are checked in parallel. This made actionlint around 1.3x faster with 3 workflow files in my environment
- Manual for
man
command was added.actionlint.1
is included in released archives. If you installed actionlint via Homebrew, the manual is also installed automatically -version
now reports how the binary was built (Go version, arch, os, ...)- Added
Command
struct to manage entire command lifecycle - Order of checked files is now stable. When all the workflows in the current repository are checked, the order is sorted by file names
- Added fuzz target for rule checkers
v1.3.0
-version
now outputs how the executable was installed.- Fix errors output to stdout was not colorful on Windows.
- Add new
-color
flag to force to enable colorful outputs. This is useful when running actionlint on GitHub Actions since scripts atrun:
don't enable colors. Linter.LintFiles
andLinter.LintFile
methods takeproject
parameter to explicitly specify what project the files belong to. Leaving itnil
automatically detects projects from their file paths.LintOptions.NoColor
is replaced byLintOptions.Color
.
Example of -version
output:
$ brew install actionlint
$ actionlint -version
1.3.0
downloaded from release page
$ go install github.com/rhysd/actionlint/cmd/actionlint@v1.3.0
go: downloading github.com/rhysd/actionlint v1.3.0
$ actionlint -version
v1.3.0
built from source
Example of running actionlint on GitHub Actions forcing to enable color output:
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color
shell: bash
v1.2.0
- pyflakes integration was added. If
pyflakes
is installed on your system, actionlint checks Python scripts inrun:
(whenshell: python
) with it. See the rule document for more details. - Error handling while running rule checkers was improved. When some internal error occurs while applying rules, actionlint stops correctly due to the error. Previously, such errors were only shown in debug logs and actionlint continued checks.
- Fixed sanitizing
${{ }}
expressions in scripts before passing them to shellcheck or pyflakes. Previously expressions were not correctly sanitized when}}
came before${{
.
v1.1.2
- Run
shellcheck
command for scripts atrun:
in parallel. Since executing an external process is heavy and running shellcheck was bottleneck of actionlint, this brought better performance. In my environment, it was more than 3x faster than before. - Sort errors by their positions in the source file.
v1.1.1
download-actionlint.yaml
now setsexecutable
output when it is run in GitHub Actions environment. Please see instruction in 'Install' document for the usage.- Redundant type
ArrayDerefType
was removed. Instead,Deref
field is now provided inArrayType
. - Fix crash on broken YAML input.
actionlint -version
returns correct version string even if theactionlint
command was installed viago install
.
v1.1.0
- Ignore SC1091 and SC2194 on running shellcheck. These are reported as false positives due to sanitization of
${{ ... }}
. See the check doc to know the sanitization. - actionlint replaces
${{ }}
inrun:
scripts before passing them to shellcheck. v1.0.0 replaced${{ }}
with whitespaces, but it caused syntax errors in some scripts (e.g.if ${{ ... }}; then ...
). Instead, v1.1.0 replaces${{ }}
with underscores. For example,${{ matrix.os }}
is replaced with________________
. - Add
download-actionlint.bash
script to download pre-built binaries easily on CI services. See installation document for the usage. - Better error message on lexing
"
in${{ }}
expression since double quote is usually misused for string delimiters -ignore
option can now be specified multiple times.- Fix
github.repositoryUrl
was not correctly resolved in${{ }}
expression - Reports an error when
if:
condition does not use${{ }}
but the expression contains any operators. The official document prohibits this explicitly to avoid conflicts with YAML syntax. - Clarify that the version of this repository is for
actionlint
CLI tool, not for library. It means that the APIs may have breaking changes on minor or patch version bumps. - Add more tests and refactor some code. Enumerating quoted items in error message is now done more efficiently and in deterministic order.