README.md in goodcheck-1.0.0 vs README.md in goodcheck-1.1.0
- old
+ new
@@ -18,10 +18,12 @@
$ gem install goodcheck
```
Or you can use `bundler`!
+If you would not like to install Goodcheck to system (e.g. you would not like to install Ruby 2.4 or higher), you can use a docker image. [See below](#docker-image).
+
## Quickstart
```bash
$ goodcheck init
$ vim goodcheck.yml
@@ -40,11 +42,11 @@
rules:
- id: com.example.github
pattern: Github
message: |
GitHub is GitHub, not Github
-
+
You may misspelling the name of the service!
justifications:
- When you mean a service different from GitHub
- When GitHub is renamed
glob:
@@ -70,11 +72,11 @@
A *pattern* can be a *literal pattern*, *regexp pattern*, *token pattern*, or a string.
When a string is given, it is interpreted as a *literal pattern* with `case_insensitive: false`.
#### *literal pattern*
-
+
*literal pattern* allows you to construct a regexp which matches exactly to the `literal` string.
```yaml
id: com.sample.GitHub
pattern:
@@ -100,11 +102,11 @@
justification:
- When you are not writing numbers, including phone numbers, zip code, ...
```
It accepts two optional attributes, `case_insensitive` and `multiline`.
-The default value of `case_insensitive` and `multiline` are `true` and `false` correspondingly.
+The default values of `case_insensitive` and `multiline` are `false`.
The regexp will be passed to `Regexp.compile`.
The precise definition of regular expression can be found in the documentation for Ruby.
#### *token pattern*
@@ -113,11 +115,12 @@
```yaml
id: com.sample.no-blink
pattern:
token: "<blink"
-message: Stop using <blink> tag
+ case_insensitive: true
+message: Stop using <blink> tag
glob: "**/*.html"
justifications:
- If Lynx is the major target of the web site
```
@@ -126,10 +129,13 @@
In that case, try using *regexp pattern*.
The generated regexp of `<blink` is `<\s*blink\b`.
It matches with `<blink />` and `< BLINK>`, but does not match with `https://www.chromium.org/blink`.
+It accepts one optional attribute, `case_insensitive`.
+The default value of `case_insensitive` is `false`.
+
### *glob*
A *glob* can be a string, or a hash.
```yaml
@@ -186,9 +192,22 @@
Use `test` command when you add new rule to be sure you are writing rules correctly.
Available options is:
* `-c [CONFIG]`, `--config=[CONFIG]` to specify the configuration file.
+
+## Docker image
+
+You can use a docker image to use Goodcheck.
+
+```bash
+$ git clone https://github.com/sideci/goodcheck
+$ cd goodcheck
+$ docker build -t goodcheck:latest .
+
+$ cd /path/to/your/project
+$ docker run -it --rm -v "$(pwd):/work" goodcheck:latest goodcheck check
+```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.