Skip to content

Commit 307da98

Browse files
committed
style: satisfy the new lint workflows
Renames LICENSE.md to LICENSE.txt so copyrights-action has a punch line to look for, adds SPDX headers to the rest, bumps the outdated actions and quiets shellcheck in clean.yml for actionlint, gives CHANGELOG.md a title and descriptive link texts to README.md for markdownlint-cli2, renames j2eoVesion and teaches typos about the inex abbreviation, normalizes YAML for yamllint, and rewords the bare TODO comments that pdd rejects as untracked puzzles.
1 parent f30678d commit 307da98

44 files changed

Lines changed: 2752 additions & 1542 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/typos.toml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2022 Polystat
22
# SPDX-License-Identifier: MIT
33

4-
[files]
5-
extend-exclude = [
6-
7-
]
4+
[default.extend-words]
5+
inex = "inex"

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2022 Polystat
2+
# SPDX-License-Identifier: MIT
13
# This file was automatically generated by sbt-github-actions using the
24
# githubWorkflowGenerate task. You should add and commit this file to
35
# your git repository. It goes without saying that you shouldn't edit
46
# this file by hand! Instead, if you wish to make changes, you should
57
# change your sbt build configuration to revise the workflow description
68
# to meet your needs, then regenerate this file.
9+
# yamllint disable rule:line-length
10+
---
711

812
name: ci
913

10-
on:
14+
'on':
1115
pull_request:
1216
branches: ['**']
1317
push:
@@ -27,19 +31,19 @@ jobs:
2731
runs-on: ${{ matrix.os }}
2832
steps:
2933
- name: Checkout current branch (full)
30-
uses: actions/checkout@v2
34+
uses: actions/checkout@v7
3135
with:
3236
fetch-depth: 0
3337

3438
- name: Setup Java (temurin@11)
3539
if: matrix.java == 'temurin@11'
36-
uses: actions/setup-java@v2
40+
uses: actions/setup-java@v5
3741
with:
3842
distribution: temurin
3943
java-version: 11
4044

4145
- name: Cache sbt
42-
uses: actions/cache@v2
46+
uses: actions/cache@v6
4347
with:
4448
path: |
4549
~/.sbt
@@ -60,7 +64,7 @@ jobs:
6064
run: tar cf targets.tar target project/target
6165

6266
- name: Upload target directories
63-
uses: actions/upload-artifact@v2
67+
uses: actions/upload-artifact@v7
6468
with:
6569
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
6670
path: targets.tar
@@ -75,17 +79,17 @@ jobs:
7579
runs-on: ${{ matrix.os }}
7680
steps:
7781
- name: Checkout current branch (fast)
78-
uses: actions/checkout@v2
82+
uses: actions/checkout@v7
7983

8084
- name: Setup Java (temurin@11)
8185
if: matrix.java == 'temurin@11'
82-
uses: actions/setup-java@v2
86+
uses: actions/setup-java@v5
8387
with:
8488
distribution: temurin
8589
java-version: 11
8690

8791
- name: Cache sbt
88-
uses: actions/cache@v2
92+
uses: actions/cache@v6
8993
with:
9094
path: |
9195
~/.sbt

‎.github/workflows/clean.yml‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2022 Polystat
2+
# SPDX-License-Identifier: MIT
13
# This file was automatically generated by sbt-github-actions using the
24
# githubWorkflowGenerate task. You should add and commit this file to
35
# your git repository. It goes without saying that you shouldn't edit
46
# this file by hand! Instead, if you wish to make changes, you should
57
# change your sbt build configuration to revise the workflow description
68
# to meet your needs, then regenerate this file.
9+
# yamllint disable rule:line-length
10+
---
711

812
name: clean
913

10-
on: push
14+
'on': push
1115

1216
jobs:
1317
delete-artifacts:
@@ -22,7 +26,7 @@ jobs:
2226
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
2327
2428
# A shortcut to call GitHub API.
25-
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
29+
ghapi() { curl --silent --location --user "_:$GITHUB_TOKEN" "$@"; }
2630
2731
# A temporary file which receives HTTP response headers.
2832
TMPFILE=/tmp/tmp.$$
@@ -42,18 +46,18 @@ jobs:
4246
rm -f $TMPFILE
4347
4448
# Number of artifacts on this page:
45-
COUNT=$(( $(jq <<<$JSON -r '.artifacts | length') ))
49+
COUNT=$(( $(jq <<<"$JSON" -r '.artifacts | length') ))
4650
4751
# Loop on all artifacts on this page.
48-
for ((i=0; $i < $COUNT; i++)); do
52+
for ((i=0; i < COUNT; i++)); do
4953
5054
# Get name of artifact and count instances of this name.
51-
name=$(jq <<<$JSON -r ".artifacts[$i].name?")
55+
name=$(jq <<<"$JSON" -r ".artifacts[$i].name?")
5256
ARTCOUNT[$name]=$(( $(( ${ARTCOUNT[$name]} )) + 1))
5357
54-
id=$(jq <<<$JSON -r ".artifacts[$i].id?")
55-
size=$(( $(jq <<<$JSON -r ".artifacts[$i].size_in_bytes?") ))
56-
printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size
57-
ghapi -X DELETE $REPO/actions/artifacts/$id
58+
id=$(jq <<<"$JSON" -r ".artifacts[$i].id?")
59+
size=$(( $(jq <<<"$JSON" -r ".artifacts[$i].size_in_bytes?") ))
60+
printf "Deleting '%s' #%d, %'d bytes\n" "$name" "${ARTCOUNT[$name]}" "$size"
61+
ghapi -X DELETE "$REPO/actions/artifacts/$id"
5862
done
5963
done

‎.github/workflows/copyrights.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
1818
- uses: actions/checkout@v7
1919
- uses: yegor256/copyrights-action@0.0.12
2020
with:
21+
ignore: >-
22+
target/**
23+
node_modules/**
24+
.git/**
25+
**/src/test/resources/**
2126
globs: >-
2227
**/LICENSE.txt
2328
**/*.sh

‎.github/workflows/release.yml‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2022 Polystat
2+
# SPDX-License-Identifier: MIT
3+
# yamllint disable rule:line-length
4+
---
15
name: release
26

3-
on:
7+
'on':
48
workflow_dispatch:
59
inputs:
610
release_version:
@@ -15,11 +19,11 @@ jobs:
1519
release-tag: ${{ steps.latest-tag.outputs.tag }}
1620
steps:
1721
- name: Check out repository code
18-
uses: actions/checkout@v2
22+
uses: actions/checkout@v7
1923
with:
2024
token: ${{ secrets.GIT_TOKEN }}
2125
- name: Setup JDK
22-
uses: actions/setup-java@v2
26+
uses: actions/setup-java@v5
2327
with:
2428
distribution: 'temurin'
2529
java-version: '11'
@@ -48,7 +52,7 @@ jobs:
4852
id: latest-tag
4953
- name: Github Release
5054
id: gh_release
51-
uses: softprops/action-gh-release@v1
55+
uses: softprops/action-gh-release@v2
5256
with:
5357
tag_name: ${{ steps.latest-tag.outputs.tag }}
5458
body_path: CHANGELOG.md
@@ -70,7 +74,7 @@ jobs:
7074
# local_path: polystat.exe
7175
# steps:
7276
# - name: Check out repository code
73-
# uses: actions/checkout@v2
77+
# uses: actions/checkout@v7
7478
# with:
7579
# token: ${{ secrets.GIT_TOKEN }}
7680
# - name: Configure local git
@@ -97,7 +101,7 @@ jobs:
97101
# echo $PATH
98102
# sbt "nativeImageCopy ${{ matrix.uploaded_filename }}" nativeImageRun
99103
# - name: Upload release
100-
# uses: softprops/action-gh-release@v1
104+
# uses: softprops/action-gh-release@v2
101105
# with:
102106
# tag_name: ${{ needs.pre-release.outputs.release-tag }}
103107
# files: ${{ matrix.uploaded_filename }}
@@ -106,15 +110,15 @@ jobs:
106110
runs-on: ubuntu-latest
107111
steps:
108112
- name: Check out repository code
109-
uses: actions/checkout@v2
113+
uses: actions/checkout@v7
110114
with:
111115
token: ${{ secrets.GIT_TOKEN }}
112116
- name: Configure local git
113117
run: |
114118
git config user.name "${{ secrets.GIT_USERNAME }}"
115119
git config user.email "${{ secrets.GIT_USER_EMAIL }}"
116120
- name: setup JDK
117-
uses: actions/setup-java@v2
121+
uses: actions/setup-java@v5
118122
with:
119123
distribution: 'temurin'
120124
java-version: '11'

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ out/
1616
hadoop_tmp
1717
**.jar
1818
!native-image-configs/*.json
19-
**.sarif
19+
**.sarif

‎CHANGELOG.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
## Polystat v0.2.0
1+
# Polystat v0.2.0
22

33
This release introduced the following changes:
44

5-
* The `--to console` cli argument was removed. Instead, the results of the analysis are printed to console by default. To disable printing the results to console, use the new `--quiet` flag (`-q` for short).
5+
* The `--to console` cli argument was removed. Instead, the results of the
6+
analysis are printed to console by default. To disable printing the results to
7+
console, use the new `--quiet` flag (`-q` for short).
68
* Added a decent-looking pretty-printer of the analysis results to console.
79
* `j2eo` was updated to 0.6.0
810
* `py2eo` was updated to 0.23.0
File renamed without changes.

‎README.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ And then simply run it like:
360360
polystat <args>
361361
```
362362

363-
More about the arguments you can pass can be found [here](#basic-usage) and
364-
[here](#full-usage-specification).
363+
More about the arguments you can pass is written in
364+
[basic usage](#basic-usage) and
365+
[full usage specification](#full-usage-specification).
365366

366367
## Basic usage
367368

@@ -566,7 +567,7 @@ polystat list [--config | -c]
566567
be found via `polystat list` command.
567568
- `--j2eo` (available only when running `polystat java`) option allows users to
568569
specify the path to the j2eo executable jar. If it's not specified, it looks
569-
for one in the current working diretory. If it's not present in the current
570+
for one in the current working directory. If it's not present in the current
570571
working directory, download one from Maven Central (for now, the version is
571572
hardcoded to be 0.4.0).
572573
- `--j2eo-version` (available only when running `polystat java`) option allows
@@ -637,7 +638,7 @@ can be printed to console by running:
637638
polystat list --config
638639
```
639640

640-
The example of the working config file can be found [here](.polystat.conf).
641+
See an example of the working [config file](.polystat.conf).
641642

642643
- `polystat.lang` - the type of input files which will be analyzed. This key
643644
must be present. Possible values:

‎coursier/polystat.json‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"polystat": {
3-
"repositories": [
4-
"ivy2Local",
5-
"central"
6-
],
7-
"dependencies": [
8-
"org.polystat:polystat-cli_3:0.2.0"
9-
]
10-
}
2+
"polystat": {
3+
"dependencies": [
4+
"org.polystat:polystat-cli_3:0.2.0"
5+
],
6+
"repositories": [
7+
"ivy2Local",
8+
"central"
9+
]
10+
}
1111
}

0 commit comments

Comments
 (0)