From 9d32d440ebf1ebd0684f5349316a15602bea5421 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Sun, 11 Apr 2021 12:51:28 +1000 Subject: feat(CI): add the GitHub Super Linter The GitHub Super Linter is a more robust and better supported tool than the current GitHub Actions we are using. Running these checks: ERROR_ON_MISSING_EXEC_BIT: true VALIDATE_BASH: true VALIDATE_BASH_EXEC: true VALIDATE_EDITORCONFIG: true VALIDATE_MARKDOWN: true VALIDATE_SHELL_SHFMT: true VALIDATE_YAML: true https://github.com/marketplace/actions/super-linter https://github.com/github/super-linter Added the GitHub Super Linter badge to the README. Also updated the pre-commit framework and added more documentation on pre-commit. Added one more pre-commit check: check-executables-have-shebangs Added one extra check for merge conflicts to our GitHub Actions. EditorConfig and Markdown linting. Minor grammar and spelling fixes. Update linter.yml --- CONTRIBUTING.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'CONTRIBUTING.md') diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e48508aa..ebc9c2239 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,11 +22,21 @@ things in mind before submitting your pull request: A framework for managing and maintaining multi-language pre-commit hooks. Pre-commit can be [installed](https://pre-commit.com/#installation) with `pip`, `curl`, `brew` or `conda`. + You need to first install pre-commit and then install the pre-commit hooks with `pre-commit install`. Now pre-commit will run automatically on git commit! + It's usually a good idea to run the hooks against all the files when adding new hooks (usually pre-commit will only run on the changed files during git hooks). Use `pre-commit run --all-files` to check all files. +To run a single hook use `pre-commit run --all-files ` + +To update use `pre-commit autoupdate` + +* [Quick start](https://pre-commit.com/#quick-start) +* [Usage](https://pre-commit.com/#usage) +* [pre-commit-autoupdate](https://pre-commit.com/#pre-commit-autoupdate) + ## Coding conventions How to style your C and Ruby code which you want to submit. @@ -41,7 +51,7 @@ C code: mruby should be highly portable to other systems and compilers. For this it is recommended to keep your code as close as possible to the C99 standard -(http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf). +(). Visual C++ is also an important target for mruby (supported version is 2013 or later). For this reason features that are not supported by Visual C++ may not @@ -73,5 +83,5 @@ language itself. Please note the following hints for your Ruby code: #### Comply with the Ruby standard (ISO/IEC 30170:2012) mruby is currently targeting to execute Ruby code which complies to ISO/IEC -30170:2012 (https://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579), +30170:2012 (), unless there's a clear reason, e.g. the latest Ruby has changed behavior from ISO. -- cgit v1.2.3