From ef03642712c27b209e540b832240c5e8eb168d64 Mon Sep 17 00:00:00 2001 From: elmsdata Date: Tue, 25 Apr 2023 14:05:37 -0500 Subject: [PATCH 1/4] Created linter github action Signed-off-by: elmsdata --- .github/workflows/linter.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/linter.yaml diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml new file mode 100644 index 0000000..ffa4706 --- /dev/null +++ b/.github/workflows/linter.yaml @@ -0,0 +1,23 @@ +--- +name: Linter +on: + push: + branches: + - fidelity-20230425-130646 +jobs: + build: + name: Lint Code Base + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Lint Code Base + uses: github/super-linter/slim@v4 + env: + FILTER_REGEX_INCLUDE: .*src/main/.* + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: fidelity-20230425-130646 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FILTER_REGEX_EXCLUDE: .*mvnw \ No newline at end of file From e21f34c45a25a4fc87f6300311fec97c6b926508 Mon Sep 17 00:00:00 2001 From: elmsdata Date: Tue, 25 Apr 2023 14:09:01 -0500 Subject: [PATCH 2/4] Finished testing and added note Signed-off-by: elmsdata --- .github/workflows/linter.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index ffa4706..9667ae7 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -1,9 +1,10 @@ +# Note: original source from https://github.com/cdevents/sdk-java/blob/main/.github/workflows/linter.yml --- name: Linter on: push: branches: - - fidelity-20230425-130646 + - main jobs: build: name: Lint Code Base @@ -18,6 +19,6 @@ jobs: env: FILTER_REGEX_INCLUDE: .*src/main/.* VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: fidelity-20230425-130646 + DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FILTER_REGEX_EXCLUDE: .*mvnw \ No newline at end of file From 0850f5c28dba32decff7041a8bd299176361f2ee Mon Sep 17 00:00:00 2001 From: elmsdata Date: Tue, 25 Apr 2023 14:10:28 -0500 Subject: [PATCH 3/4] Updated condition Signed-off-by: elmsdata --- .github/workflows/linter.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index 9667ae7..a94f567 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -2,9 +2,8 @@ --- name: Linter on: - push: - branches: - - main + pull_request: + branches: [main] jobs: build: name: Lint Code Base From ef835379ade926ebae7bcc5ff48c2166fbfed470 Mon Sep 17 00:00:00 2001 From: elmsdata Date: Tue, 25 Apr 2023 14:11:48 -0500 Subject: [PATCH 4/4] Added newline Signed-off-by: elmsdata --- .github/workflows/linter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index a94f567..9ab046c 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -20,4 +20,4 @@ jobs: VALIDATE_ALL_CODEBASE: false DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FILTER_REGEX_EXCLUDE: .*mvnw \ No newline at end of file + FILTER_REGEX_EXCLUDE: .*mvnw