mirror of
https://github.com/super-linter/super-linter.git
synced 2024-12-22 07:12:11 -05:00
adding rules file (#1644)
* adding rules file * fix naming * cleanup * make smart * fixing the make * adding template * white space * not sure how i got windows * found the space
This commit is contained in:
parent
35653520cd
commit
2c135d4a17
4 changed files with 1954 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -86,9 +86,11 @@ endif
|
|||
|
||||
.PHONY: inspec
|
||||
inspec: inspec-check ## Run InSpec tests
|
||||
LOCAL_IMAGE="$$(docker images $(SUPER_LINTER_TEST_CONTINER_URL) |grep 'ghcr.io/github/super-linter')"; \
|
||||
if [ "$$?" -ne 0 ]; then docker build -t $(SUPER_LINTER_TEST_CONTINER_URL) -f Dockerfile .; fi && \
|
||||
DOCKER_CONTAINER_STATE="$$(docker inspect --format "{{.State.Running}}" "$(SUPER_LINTER_TEST_CONTAINER_NAME)" 2>/dev/null || echo "")"; \
|
||||
if [ "$$DOCKER_CONTAINER_STATE" = "true" ]; then docker kill "$(SUPER_LINTER_TEST_CONTAINER_NAME)"; fi && \
|
||||
docker build -t $(SUPER_LINTER_TEST_CONTAINER_NAME) -f $(DOCKERFILE) . && \
|
||||
docker tag $(SUPER_LINTER_TEST_CONTINER_URL) $(SUPER_LINTER_TEST_CONTAINER_NAME) && \
|
||||
SUPER_LINTER_TEST_CONTAINER_ID="$$(docker run -d --name "$(SUPER_LINTER_TEST_CONTAINER_NAME)" --rm -it --entrypoint /bin/ash "$(SUPER_LINTER_TEST_CONTAINER_NAME)" -c "while true; do sleep 1; done")" \
|
||||
&& docker run $(DOCKER_FLAGS) \
|
||||
--rm \
|
||||
|
|
|
@ -289,6 +289,7 @@ But if you wish to select or exclude specific linters, we give you full control
|
|||
| **MULTI_STATUS** | `true` | A status API is made for each language that is linted to make visual parsing easier. |
|
||||
| **MARKDOWN_CONFIG_FILE** | `.markdown-lint.yml` | Filename for [Markdownlint configuration](https://github.com/DavidAnson/markdownlint#optionsconfig) (ex: `.markdown-lint.yml`, `.markdownlint.json`, `.markdownlint.yaml`) |
|
||||
| **MARKDOWN_CUSTOM_RULE_GLOBS** | `.markdown-lint/rules,rules/**` | Comma-separated list of [file globs](https://github.com/igorshubovych/markdownlint-cli#globbing) matching [custom Markdownlint rule files](https://github.com/DavidAnson/markdownlint/blob/main/doc/CustomRules.md). |
|
||||
| **PHP_CONFIG_FILE** | `php.ini` | Filename for [PHP Configuration](https://www.php.net/manual/en/configuration.file.php) (ex: `php.ini`) |
|
||||
| **PYTHON_BLACK_CONFIG_FILE** | `.python-black` | Filename for [black configuration](https://github.com/psf/black/blob/master/docs/compatible_configs.md) (ex: `.isort.cfg`, `pyproject.toml`) |
|
||||
| **PYTHON_FLAKE8_CONFIG_FILE** | `.flake8` | Filename for [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) (ex: `.flake8`, `tox.ini`) |
|
||||
| **PYTHON_ISORT_CONFIG_FILE** | `.isort.cfg` | Filename for [isort configuration](https://pycqa.github.io/isort/docs/configuration/config_files/) (ex: `.isort.cfg`, `pyproject.toml`) |
|
||||
|
|
1947
TEMPLATES/php.ini
Normal file
1947
TEMPLATES/php.ini
Normal file
File diff suppressed because it is too large
Load diff
|
@ -124,6 +124,8 @@ MARKDOWN_FILE_NAME="${MARKDOWN_CONFIG_FILE:-.markdown-lint.yml}"
|
|||
# shellcheck disable=SC2034 # Variable is referenced indirectly
|
||||
OPENAPI_FILE_NAME=".openapirc.yml"
|
||||
# shellcheck disable=SC2034 # Variable is referenced indirectly
|
||||
PHP_BUILTIN_FILE_NAME="${PHP_CONFIG_FILE:-php.ini}"
|
||||
# shellcheck disable=SC2034 # Variable is referenced indirectly
|
||||
PHP_PHPCS_FILE_NAME="phpcs.xml"
|
||||
# shellcheck disable=SC2034 # Variable is referenced indirectly
|
||||
PHP_PHPSTAN_FILE_NAME="phpstan.neon"
|
||||
|
@ -835,7 +837,7 @@ if [ -n "${MARKDOWN_CUSTOM_RULE_GLOBS}" ]; then
|
|||
fi
|
||||
LINTER_COMMANDS_ARRAY['OPENAPI']="spectral lint -r ${OPENAPI_LINTER_RULES}"
|
||||
LINTER_COMMANDS_ARRAY['PERL']="perlcritic"
|
||||
LINTER_COMMANDS_ARRAY['PHP_BUILTIN']="php -l"
|
||||
LINTER_COMMANDS_ARRAY['PHP_BUILTIN']="php -l -c ${PHP_BUILTIN_LINTER_RULES}"
|
||||
LINTER_COMMANDS_ARRAY['PHP_PHPCS']="phpcs --standard=${PHP_PHPCS_LINTER_RULES}"
|
||||
LINTER_COMMANDS_ARRAY['PHP_PHPSTAN']="phpstan analyse --no-progress --no-ansi --memory-limit 1G -c ${PHP_PHPSTAN_LINTER_RULES}"
|
||||
LINTER_COMMANDS_ARRAY['PHP_PSALM']="psalm --config=${PHP_PSALM_LINTER_RULES}"
|
||||
|
|
Loading…
Reference in a new issue