Skip to content

Commit

Permalink
Merge main. (#140)
Browse files Browse the repository at this point in the history
* Remove comment.

* Format with recent version of Ormolu.

* Don't have Dependabot update Docker image references.

* Bump haskell-actions/setup from 2.5.3 to 2.6.0 (#137)

Bumps [haskell-actions/setup](https://github.com/haskell-actions/setup) from 2.5.3 to 2.6.0.
- [Release notes](https://github.com/haskell-actions/setup/releases)
- [Commits](haskell-actions/setup@7398b0c...7508980)

---
updated-dependencies:
- dependency-name: haskell-actions/setup
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump docker/metadata-action from 5.2.0 to 5.3.0 (#136)

Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@e6428a5...31cebac)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/stale from 8.0.0 to 9.0.0 (#135)

Bumps [actions/stale](https://github.com/actions/stale) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@1160a22...28ca103)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump actions/upload-artifact from 3.1.3 to 4.0.0 (#138)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@a8a3f3a...c7d193f)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update to Haskell Stack LTS 22.0.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
chungyc and dependabot[bot] authored Dec 20, 2023
1 parent 0842270 commit cf29f47
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 33 deletions.
11 changes: 7 additions & 4 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ updates:
schedule:
interval: "weekly"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
# It would be nice to keep these up to date,
# but it's more important to keep versions consistent with the build.
#
# - package-ecosystem: "docker"
# directory: "/"
# schedule:
# interval: "weekly"
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: haskell-actions/setup@7398b0c373cccf9ed5dfddae26f77ed02dea4967 # v2.5.3
- uses: haskell-actions/setup@75089801accaefd2e8c4a899d6101caa5bdcbc77 # v2.6.0
with:
enable-stack: true

Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Upload coverage report
if: ${{ inputs.coverage }}
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: coverage-report
path: ${{ steps.coverage.outputs.report }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Extract metadata
id: meta
uses: docker/metadata-action@e6428a5c4e294a61438ed7f43155db912025b6b3 # v5.2.0
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: SARIF file
path: results.sarif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
with:
days-before-stale: 90
days-before-close: 30
Expand Down
4 changes: 1 addition & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
# https://docs.haskellstack.org/en/stable/yaml_configuration/

# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# Use a nightly build for now so that we can build an unreleased version
# of HLint with SARIF support.
resolver: lts-21.24
resolver: lts-22.0

# User packages to be built.
packages:
Expand Down
43 changes: 22 additions & 21 deletions test/ArgumentsSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,23 @@ spec = do
`shouldBe` Nothing

prop "argument must have '=' character" $ \s ->
('=' `notElem` s) ==>
validate [s]
`shouldSatisfy` isJust
('=' `notElem` s)
==> validate [s]
`shouldSatisfy` isJust

prop "argument must not have duplicate keyword" $ \key v v' ->
'=' `notElem` key ==> \keyValues ->
let otherArgs = map (\(x, y) -> x <> "=" <> y) keyValues
args' = [key <> "=" <> v, key <> "=" <> v'] ++ otherArgs
in forAll (shuffle args') $ \args ->
validate args `shouldSatisfy` isJust
'='
`notElem` key ==> \keyValues ->
let otherArgs = map (\(x, y) -> x <> "=" <> y) keyValues
args' = [key <> "=" <> v, key <> "=" <> v'] ++ otherArgs
in forAll (shuffle args') $ \args ->
validate args `shouldSatisfy` isJust

prop "argument must have explicitly allowed keyword" $ \key v ->
('=' `notElem` key) ==>
(key `notElem` ["binary", "path", "hints", "category", "token"]) ==>
validate [key <> "=" <> v]
`shouldSatisfy` isJust
('=' `notElem` key)
==> (key `notElem` ["binary", "path", "hints", "category", "token"])
==> validate [key <> "=" <> v]
`shouldSatisfy` isJust

prop "path may not look like a flag" $ \pathSuffix paths' ->
forAll (shuffle $ ("-" <> pathSuffix) : paths') $ \paths ->
Expand Down Expand Up @@ -115,15 +116,15 @@ spec = do
&& (hints /= "")
&& (category /= "")
&& (token /= "")
==> forAll
( shuffle
[ "binary=" <> binary,
"path=" <> paths,
"hints=" <> hints,
"category=" <> category,
"token=" <> token
]
)
==> forAll
( shuffle
[ "binary=" <> binary,
"path=" <> paths,
"hints=" <> hints,
"category=" <> category,
"token=" <> token
]
)
$ \args ->
translate args
`shouldBe` ( binary,
Expand Down

0 comments on commit cf29f47

Please sign in to comment.