Skip to content

Commit

Permalink
describe how to check content of object or array in checks.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Aug 22, 2021
1 parent 3d64c2b commit f2492d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions docs/checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,14 @@ Type checks for expression syntax in `${{ }}` are done by semantics checker. Not
runtime is loose.

Any object value can be assigned into string value as string `'Object'`. `echo '${{ env }}'` will be replaced with
`echo 'Object'`. Such loose conversions are bugs in almost all cases. actionlint checks types more strictly. actionlint checks
values evaluated at `${{ }}` are not object (replaced with string `'Object'`), array (replaced with string `'Array'`), nor null
(replaced with string `''`).
`echo 'Object'`. And an array can also be converted into `'Array'` string. Such loose conversions are bugs in almost all cases.
actionlint checks types more strictly. actionlint checks values evaluated at `${{ }}` are not object (replaced with string
`'Object'`), array (replaced with string `'Array'`), nor null (replaced with string `''`). If you want to check a content of
object or array, use `toJSON()` function.

```
echo '${{ toJSON(github.events) }}'
```
There are two types of object types internally. One is an object which is strict for properties, which causes a type error
when trying to access to unknown properties. And another is an object which is not strict for properties, which allows to
Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Prebuilt binaries are built at each release by CI for the following OS and arch:

- macOS (x86_64, arm64)
- Linux (i386, x86_64, arm32, arm64)
- Windows (i386, x86_64)
- Windows (i386, x86_64, arm64)
- FreeBSD (i386, x86_64)

Note: The author doesn't have Apple M1 environment so `darwin/arm64` target binary is not tested.
Note: `darwin/arm64` and `windows/arm64` target binaries are not tested since the author doesn't have the environments.

<a name="download-script"></a>
## Download script
Expand Down

0 comments on commit f2492d3

Please sign in to comment.