Commit 1c9b1bfe authored by John Bampton's avatar John Bampton

feat: add pre-commit framework

parent 65add8c6
---
default_stages: [commit, push]
default_language_version:
# force all unspecified Python hooks to run python3
python: python3
minimum_pre_commit_version: "1.20.0"
repos:
- repo: meta
hooks:
- id: identity
- id: check-hooks-apply
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
# - repo: git://github.com/Lucas-C/pre-commit-hooks
# rev: v1.1.9
# hooks:
# - id: forbid-tabs
# - id: remove-tabs
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.26.0
hooks:
- id: markdownlint
name: Run markdownlint
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.0
hooks:
- id: yamllint
name: Check YAML files with yamllint
entry: yamllint --strict .
types: [yaml]
......@@ -18,6 +18,15 @@ things in mind before submitting your pull request:
* Use mrbgem to provide non ISO features (classes, modules and methods) unless
you have a special reason to implement them in the core
## Pre-commit
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.
## Coding conventions
How to style your C and Ruby code which you want to submit.
......
......@@ -3,4 +3,3 @@ LEGAL NOTICE INFORMATION
All the files in this distribution are covered under the MIT license
(see the file LICENSE) except some files mentioned below:
......@@ -17,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
......@@ -9,5 +9,3 @@ with all sufficient information, see the ChangeLog file.
** Information about first release v1.0.0
......@@ -17,4 +17,3 @@
#define MRB_DEBUG_BREAK_NO_OVER (-15)
#endif
......@@ -205,4 +205,3 @@ mrb_reserved_word (register const char *str, register size_t len)
return 0;
}
#line 52 "mrbgems/mruby-compiler/core/keywords"
......@@ -21,4 +21,3 @@ assert('Toplevel#include') do
assert_equal :foo, method_foo
assert_equal :bar2, CONST_BAR
end
......@@ -8,4 +8,3 @@ end
assert('BasicObject superclass') do
assert_nil(BasicObject.superclass)
end
......@@ -58,4 +58,4 @@ assert('next expression', '11.5.2.4.4') do
end
all
end
end
\ No newline at end of file
end
......@@ -8,4 +8,3 @@ end
assert('Object superclass', '15.2.1.2') do
assert_equal BasicObject, Object.superclass
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment