Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linters to CI #883

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gherkin-lintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
workflow:
- ./*
- ./*
5 changes: 2 additions & 3 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler/blob/master/README.md

---
name: Labeler
on: [pull_request]
on: [pull_request] # yamllint disable-line rule:truthy

jobs:
label:

runs-on: ubuntu-latest

steps:
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright 2020 The Serverless Workflow Specification Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This workflow will run a set of linters on all files in the repository
# to ensure consistent formatting and style. It uses the super-linter
# action, which is a combination of many linters and formatters.
#
# For more information, see:
# https://github.com/super-linter/super-linter/blob/main/README.md
---
name: Lint
on: # yamllint disable-line rule:truthy
push:
branches: ["main"]
paths:
- "**/*.md"
- "**/*.yaml"
pull_request:
branches: ["main"]
paths:
- "**/*.md"
- "**/*.yaml"

jobs:
lint:
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

steps:
- uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
- uses: super-linter/[email protected]
env:
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# relative to $DEFAULT_WORKSPACE=$GITHUB_WORKSPACE
LINTER_RULES_PATH: "."

# check all files (including unmodified) in the repository
VALIDATE_ALL_CODEBASE: true

VALIDATE_MARKDOWN: true
MARKDOWN_CONFIG_FILE: .markdownlint.yaml

VALIDATE_YAML: true
YAML_CONFIG_FILE: .yamllint.yaml

VALIDATE_GHERKIN: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_JSON: true
34 changes: 17 additions & 17 deletions .github/workflows/schema-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler/blob/master/README.md

---
name: Verify Specification Examples

on:
on: # yamllint disable-line rule:truthy
push:
branches: [ "main" ]
branches: ["main"]
paths:
- 'schema/**'
- 'examples/**'
- "schema/**"
- "examples/**"
pull_request:
branches: [ "main" ]
branches: ["main"]
paths:
- 'schema/**'
- 'examples/**'
- "schema/**"
- "examples/**"

jobs:
build:
Expand All @@ -44,12 +44,12 @@ jobs:
node-version: [21.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: .ci/validation/package-lock.json
- run: npm install
- run: npm test
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: .ci/validation/package-lock.json
- run: npm install
- run: npm test
31 changes: 22 additions & 9 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,40 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
name: Mark stale issues and pull requests

on:
on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 0 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-issue-label: 'Stale Issue'
exempt-issue-labels: 'Status: Blocked, Status: In progress, Status: On hold, Status: Awaiting response'
stale-pr-label: 'Stale PR'
exempt-pr-labels: 'Status: Blocked, Status: In progress, Status: On hold, Status: Awaiting response'
stale-issue-message: >
This issue has been automatically marked as stale because it has
not had recent activity. It will be closed if no further activity
occurs. Thank you for your contributions.
stale-pr-message: >
This pull request has been automatically marked as stale because it
has not had recent activity. It will be closed if no further
activity occurs. Thank you for your contributions.
stale-issue-label: "Stale Issue"
exempt-issue-labels: >
Status: Blocked,
Status: In progress,
Status: On hold,
Status: Awaiting response
stale-pr-label: "Stale PR"
exempt-pr-labels: >
Status: Blocked,
Status: In progress,
Status: On hold,
Status: Awaiting response
days-before-stale: 45
days-before-close: 20
12 changes: 6 additions & 6 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
{
"default": true,
"MD024": { "allow_different_nesting": true },
"MD024": { "siblings_only": true },
"MD029": { "style": "ordered" },
"ul-style": false, # MD004
"line-length": false, # MD013
"no-inline-html": false, # MD033
"fenced-code-language": false # MD040
"ul-style": false, # MD004
"line-length": false, # MD013
"no-inline-html": false, # MD033
"fenced-code-language": false, # MD040
}
3 changes: 1 addition & 2 deletions .typo-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

# What language dictionaries should it use? Currently Typo CI supports:
# de
# en
Expand All @@ -22,7 +21,7 @@ excluded_files:
- ".typo-ci.yml"
- ".markdownlint.yaml"
- "Makefile"

# Any typos we should ignore?
excluded_words:
- typoci
Expand Down
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["davidanson.vscode-markdownlint", "redhat.vscode-yaml"]
}
30 changes: 20 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
{
"rewrap.wrappingColumn": 80,
"editor.rulers": [80],
"markdownlint.config": {
"MD004": false,
"MD013": false,
"MD024": {"allow_different_nesting": true},
"MD029": {"style": "ordered"},
"MD033": false,
"MD040": false,
},
"rewrap.wrappingColumn": 80,
"editor.rulers": [80],
"yaml.format.singleQuote": false,
"yaml.format.proseWrap": "always",
"yaml.format.bracketSpacing": true,
"yaml.format.enable": true,
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"markdownlint.config": {
"MD004": false,
"MD013": false,
"MD024": { "siblings_only": true },
"MD029": { "style": "ordered" },
"MD033": false,
"MD040": false
}
}
9 changes: 9 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
extends: default

rules:
comments:
min-spaces-from-content: 1
braces:
min-spaces-inside: 1
max-spaces-inside: 1
11 changes: 6 additions & 5 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Serverless Workflow Org Maintainers

* [Antonio Mendoza Pérez](https://github.com/antmendoza)
* [Charles d'Avernas](https://github.com/cdavernas)
* [Ricardo Zanini](https://github.com/ricardozanini)
* [Tihomir Surdilovic](https://github.com/tsurdilo)
- [Antonio Mendoza Pérez](https://github.com/antmendoza)
- [Charles d'Avernas](https://github.com/cdavernas)
- [Ricardo Zanini](https://github.com/ricardozanini)
- [Tihomir Surdilovic](https://github.com/tsurdilo)

# Maintainers Mailing list
[cncf-serverlessws-maintainers](mailto:[email protected])

[cncf-serverlessws-maintainers](mailto:[email protected])
1 change: 1 addition & 0 deletions code-of-conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/mai
If your project isn't prepared to handle reports, remove the project email address and just have
reporters send to [email protected].
-->

Please contact the [CNCF Code of Conduct Committee](mailto:[email protected])
in order to report violations of the Code of Conduct.
4 changes: 2 additions & 2 deletions community/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Community
# Community

Here you can find information about our:

- [Contributors](contributors.md): People and companies contributing to the
Serverless workflow specification and ecosystem
- [Presentations](https://serverlessworkflow.io/): Community presentations about the project (see the 'Resources' section)
- [Presentations](https://serverlessworkflow.io/): Community presentations about the project (see the 'Resources' section)
Loading
Loading