Skip to content

Commit

Permalink
ci: upgrade to super-linter 6 (dunglas#930)
Browse files Browse the repository at this point in the history
* ci: upgrade to super-linter 6

* chore: various style fixes

* docs: Symfony Mercure

* fix
  • Loading branch information
dunglas authored Aug 14, 2024
1 parent a29710b commit d8b640d
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 23 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
tags:
- v*.*.*

permissions:
contents: read
packages: read
statuses: write

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -18,14 +23,18 @@ jobs:
with:
fetch-depth: 0
- name: Lint Code Base
uses: super-linter/super-linter/slim@v5
uses: super-linter/super-linter/slim@v6
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_CHECKOV: false
VALIDATE_GITLEAKS: false
VALIDATE_GO: false
VALIDATE_GO_MODULES: false
VALIDATE_PHP_PHPCS: false
VALIDATE_KUBERNETES_KUBECONFORM: false
VALIDATE_KUBERNETES_KUBEVAL: false
VALIDATE_JAVASCRIPT_PRETTIER: false
VALIDATE_TYPESCRIPT_PRETTIER: false
VALIDATE_TYPESCRIPT_STANDARD: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_PYTHON_PYLINT: false
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ When you send a PR, make sure that:

### Configuring Visual Studio Code

A configuration for VSCode is provided in the `.vscode/` directory of the repository.
It is automatically loaded by VS Code.
A configuration for Visual Studio Code is provided in the `.vscode/` directory of the repository.
It is automatically loaded by Visual Studio Code.

### Finding Deadlocks

Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For support requests related to the [Cloud](../hub/cloud.md) or the [On Premise]

## Community Support

* [StackOverflow: ask questions using the `mercure` tag](https://stackoverflow.com/questions/tagged/mercure)
* [Stack Overflow: ask questions using the `mercure` tag](https://stackoverflow.com/questions/tagged/mercure)
* [Slack: chat with the community on the `#mercure` channel on Symfony's Slack](https://symfony.com/slack)

## Commercial Support
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The `EventSource` class is available [in all modern web browsers](https://canius

It is important to close this connection between the client and the hub if it is no longer needed.
Opened connections have a continuous buffer that will drain your application resources.
This is especially true when using Single Page Applications (based on e.g. ReactJS): the connection is maintained even if the component that created it is unmounted.
This is especially true when using Single Page Applications (based on e.g. React): the connection is maintained even if the component that created it is unmounted.

To close the connection, call `eventSource.close()`.

Expand Down
2 changes: 2 additions & 0 deletions examples/publish/php.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

// Alternatively, use the Symfony Mercure Component: https://github.com/symfony/mercure

define('DEMO_JWT', 'eyJhbGciOiJIUzI1NiJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOlsiKiJdLCJzdWJzY3JpYmUiOlsiaHR0cHM6Ly9leGFtcGxlLmNvbS9teS1wcml2YXRlLXRvcGljIiwie3NjaGVtZX06Ly97K2hvc3R9L2RlbW8vYm9va3Mve2lkfS5qc29ubGQiLCIvLndlbGwta25vd24vbWVyY3VyZS9zdWJzY3JpcHRpb25zey90b3BpY317L3N1YnNjcmliZXJ9Il0sInBheWxvYWQiOnsidXNlciI6Imh0dHBzOi8vZXhhbXBsZS5jb20vdXNlcnMvZHVuZ2xhcyIsInJlbW90ZUFkZHIiOiIxMjcuMC4wLjEifX19.KKPIikwUzRuB3DTpVw6ajzwSChwFw5omBMmMcWKiDcM');

$postData = http_build_query([
Expand Down
22 changes: 11 additions & 11 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ set -o errtrace
set -o pipefail
set -o xtrace

if ! type "git" > /dev/null; then
echo "The \"git\" command must be installed."
exit 1
if ! type "git" >/dev/null; then
echo "The \"git\" command must be installed."
exit 1
fi

if ! type "helm-docs" > /dev/null; then
echo "The \"helm-docs\" command (https://github.com/norwoodj/helm-docs) must be installed."
exit 1
if ! type "helm-docs" >/dev/null; then
echo "The \"helm-docs\" command (https://github.com/norwoodj/helm-docs) must be installed."
exit 1
fi

if [ $# -ne 1 ]; then
echo "Usage: ./release.sh version" >&2
exit 1
if [[ $# -ne 1 ]]; then
echo "Usage: ./release.sh version" >&2
exit 1
fi

# Adapted from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
if [[ ! $1 =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then
echo "Invalid version number: $1" >&2
exit 1
echo "Invalid version number: $1" >&2
exit 1
fi

git checkout main
Expand Down
8 changes: 4 additions & 4 deletions tests/use-go-deadlock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Install github.com/sasha-s/go-deadlock and use it to test mutexes

SEP="\n\t"
args=( "-i" )
if [[ "$(uname)" = "Darwin" ]]; then
SEP=$'\\\n\\\t'
args=( "-i" "" )
args=("-i")
if [[ "$(uname || true)" = "Darwin" ]]; then
SEP=$'\\\n\\\t'
args=("-i" "")
fi

go install golang.org/x/tools/cmd/goimports@latest
Expand Down

0 comments on commit d8b640d

Please sign in to comment.