goodcheck 2.4.4 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -2
  3. data/README.md +107 -50
  4. data/lib/goodcheck.rb +4 -3
  5. data/lib/goodcheck/buffer.rb +44 -1
  6. data/lib/goodcheck/cli.rb +78 -54
  7. data/lib/goodcheck/commands/check.rb +20 -1
  8. data/lib/goodcheck/commands/config_loading.rb +19 -2
  9. data/lib/goodcheck/commands/init.rb +4 -2
  10. data/lib/goodcheck/commands/pattern.rb +2 -1
  11. data/lib/goodcheck/commands/test.rb +5 -4
  12. data/lib/goodcheck/config_loader.rb +6 -5
  13. data/lib/goodcheck/error.rb +3 -0
  14. data/lib/goodcheck/exit_status.rb +6 -0
  15. data/lib/goodcheck/glob.rb +14 -3
  16. data/lib/goodcheck/import_loader.rb +42 -10
  17. data/lib/goodcheck/version.rb +1 -1
  18. metadata +8 -70
  19. data/.gitignore +0 -13
  20. data/.rubocop.yml +0 -5
  21. data/.travis.yml +0 -11
  22. data/Dockerfile +0 -13
  23. data/Gemfile +0 -6
  24. data/Rakefile +0 -50
  25. data/bin/console +0 -14
  26. data/bin/setup +0 -8
  27. data/cheatsheet.pdf +0 -0
  28. data/docusaurus/.dockerignore +0 -2
  29. data/docusaurus/.gitignore +0 -12
  30. data/docusaurus/Dockerfile +0 -10
  31. data/docusaurus/docker-compose.yml +0 -18
  32. data/docusaurus/docs/commands.md +0 -69
  33. data/docusaurus/docs/configuration.md +0 -300
  34. data/docusaurus/docs/development.md +0 -15
  35. data/docusaurus/docs/getstarted.md +0 -46
  36. data/docusaurus/docs/rules.md +0 -79
  37. data/docusaurus/website/README.md +0 -193
  38. data/docusaurus/website/core/Footer.js +0 -100
  39. data/docusaurus/website/package.json +0 -14
  40. data/docusaurus/website/pages/en/index.js +0 -207
  41. data/docusaurus/website/pages/en/versions.js +0 -118
  42. data/docusaurus/website/sidebars.json +0 -11
  43. data/docusaurus/website/siteConfig.js +0 -171
  44. data/docusaurus/website/static/css/code-block-buttons.css +0 -39
  45. data/docusaurus/website/static/css/custom.css +0 -245
  46. data/docusaurus/website/static/img/favicon.ico +0 -0
  47. data/docusaurus/website/static/js/code-block-buttons.js +0 -47
  48. data/docusaurus/website/versioned_docs/version-1.0.0/commands.md +0 -70
  49. data/docusaurus/website/versioned_docs/version-1.0.0/configuration.md +0 -296
  50. data/docusaurus/website/versioned_docs/version-1.0.0/development.md +0 -16
  51. data/docusaurus/website/versioned_docs/version-1.0.0/getstarted.md +0 -47
  52. data/docusaurus/website/versioned_docs/version-1.0.0/rules.md +0 -81
  53. data/docusaurus/website/versioned_docs/version-1.0.2/rules.md +0 -79
  54. data/docusaurus/website/versioned_docs/version-2.4.0/configuration.md +0 -301
  55. data/docusaurus/website/versioned_docs/version-2.4.3/rules.md +0 -80
  56. data/docusaurus/website/versioned_sidebars/version-1.0.0-sidebars.json +0 -11
  57. data/docusaurus/website/versioned_sidebars/version-1.0.2-sidebars.json +0 -11
  58. data/docusaurus/website/versioned_sidebars/version-2.4.0-sidebars.json +0 -11
  59. data/docusaurus/website/versions.json +0 -8
  60. data/docusaurus/website/yarn.lock +0 -6844
  61. data/goodcheck.gemspec +0 -36
  62. data/goodcheck.yml +0 -10
  63. data/logo/GoodCheck Horizontal.pdf +0 -899
  64. data/logo/GoodCheck Horizontal.png +0 -0
  65. data/logo/GoodCheck Horizontal.svg +0 -55
  66. data/logo/GoodCheck logo.png +0 -0
  67. data/logo/GoodCheck vertical.png +0 -0
  68. data/sample.yml +0 -57
@@ -1,171 +0,0 @@
1
- /**
2
- * Copyright (c) 2017-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- // See https://docusaurus.io/docs/site-config for all the possible
9
- // site configuration options.
10
-
11
- // List of projects/orgs using your project for the users page.
12
- // const users = [
13
- // {
14
- // caption: 'User1',
15
- // // You will need to prepend the image path with your baseUrl
16
- // // if it is not '/', like: '/test-site/img/image.jpg'.
17
- // image: 'https://github.com/sider/goodcheck/raw/master/logo/GoodCheck%20Horizontal.png',
18
- // infoLink: 'https://github.com/sider/goodcheck',
19
- // pinned: true,
20
- // },
21
- // ];
22
-
23
- const siteConfig = {
24
- title: 'Goodcheck', // Title for your website.
25
- tagline: 'A regexp based customizable linter',
26
- url: 'https://sider.github.io', // Your website URL
27
- baseUrl: '/goodcheck/', // Base URL for your project */
28
- // For github.io type URLs, you would set the url and baseUrl like:
29
- // url: 'https://facebook.github.io',
30
- // baseUrl: '/test-site/',
31
-
32
- // Used for publishing and more
33
- projectName: 'goodcheck',
34
- organizationName: 'sider',
35
- // For top-level user or org sites, the organization is still the same.
36
- // e.g., for the https://JoelMarcey.github.io site, it would be set like...
37
- // organizationName: 'JoelMarcey'
38
-
39
- // For no header links in the top nav bar -> headerLinks: [],
40
- headerLinks: [
41
- { doc: 'getstarted', label: 'Get Started' },
42
- { doc: 'configuration', label: 'Configuration' },
43
- { doc: 'rules', label: 'Rule' },
44
- { doc: 'commands', label: 'Commands' },
45
- ],
46
-
47
- // If you have users set above, you add it here:
48
- // users,
49
-
50
- /* path to images for header/footer */
51
- headerIcon: 'img/favicon.ico',
52
- footerIcon: 'img/favicon.ico',
53
- favicon: 'img/favicon.ico',
54
-
55
- /* Colors for website */
56
- colors: {
57
- primaryColor: '#09345D', // hsl(209, 82%, 19%)
58
- secondaryColor: '#044d82',
59
- lightColor: '#eaeef3',
60
- },
61
-
62
- /* Custom fonts for website */
63
- /*
64
- fonts: {
65
- myFont: [
66
- "Times New Roman",
67
- "Serif"
68
- ],
69
- myOtherFont: [
70
- "-apple-system",
71
- "system-ui"
72
- ]
73
- },
74
- */
75
-
76
- // This copyright info is used in /core/Footer.js and blog RSS/Atom feeds.
77
- copyright: `Copyright © ${new Date().getFullYear()} Goodcheck`,
78
-
79
- highlight: {
80
- // Highlight.js theme to use for syntax highlighting in code blocks.
81
- theme: 'mono-blue',
82
- },
83
-
84
- // Add custom scripts here that would be placed in <script> tags.
85
- scripts: [
86
- 'https://buttons.github.io/buttons.js',
87
- 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js',
88
- '/js/code-block-buttons.js',
89
- ],
90
- stylesheets: ['/css/code-block-buttons.css'],
91
-
92
- // On page navigation for the current documentation page.
93
- onPageNav: 'separate',
94
- // No .html extensions for paths.
95
- cleanUrl: true,
96
-
97
- // Open Graph and Twitter card images.
98
- // ogImage: 'img/undraw_online.svg',
99
- // twitterImage: 'img/undraw_tweetstorm.svg',
100
-
101
- // For sites with a sizable amount of content, set collapsible to true.
102
- // Expand/collapse the links and subcategories under categories.
103
- // docsSideNavCollapsible: true,
104
-
105
- // Show documentation's last contributor's name.
106
- // enableUpdateBy: true,
107
-
108
- // Show documentation's last update time.
109
- // enableUpdateTime: true,
110
-
111
- // You may provide arbitrary config keys to be used as needed by your
112
- // template. For example, if you need your repo's URL...
113
- repoUrl: 'https://github.com/sider/goodcheck',
114
-
115
- splash: {
116
- title: `Goodcheck`,
117
- description: "A regexp based customizable linter",
118
- button: "Get Started",
119
- id: "com.example.github",
120
- pattern: "Github",
121
- message: `|
122
- GitHub is GitHub, not Github
123
-
124
- You may have misspelling the name of the service!`,
125
- resultFront: `index.html: 91: - <a>Signup via `,
126
- match: "Github",
127
- resultEnd: `</a>: GitHub is GitHub, not Github`
128
- },
129
-
130
- featureOne: {
131
- title: `A Goodcheck rule`,
132
- description:
133
- "Define patterns with messages in a goodcheck.yml file and run goodcheck within your repository. Any matching results will be displayed in the terminal.",
134
- id: "com.sample.no-blink",
135
- pattern: "<blink",
136
- message: `|
137
- Stop using <blink> tag`,
138
-
139
- resultFront: `index.html:50: <h3>`,
140
- match: "<blink>",
141
- resultEnd: `HTML5 Markup</blink></h3>: Stop using <blink> tag`
142
- },
143
-
144
- featureTwo: {
145
- title: `A rule with negated pattern`,
146
- description:
147
- "Goodcheck rules are usually to detect if something is included in a file. You can define the negated rules for the opposite, something is missing in a file.",
148
- id: "com.sample.negated",
149
- not: true,
150
- pattern: "<!DOCTYPE html>",
151
- message: `|
152
- Write a doctype on HTML files.`,
153
-
154
- resultFront: `index.html:-:<html lang="en">: Write a doctype on HTML files.`,
155
- glob: "**/*.html"
156
- },
157
-
158
- featureThree: {
159
- title: `A rule without pattern`,
160
- description:
161
- "You can define a rule without pattern. The rule emits an issue on each file specified with glob. You cannot omit glob from a rule definition without pattern. ",
162
- id: "com.sample.without_pattern",
163
- message: `|
164
- Read the operation manual for DB migration: https://example.com/guides/123 `,
165
-
166
- resultFront: `db/schema.rb:-:# This file is auto-generated from the current state of the database. Instead: Read the operation manual for DB migration: https://example.com/guides/123`,
167
- glob: "db/schema.rb"
168
- },
169
- };
170
-
171
- module.exports = siteConfig;
@@ -1,39 +0,0 @@
1
- /* "Copy" code block button */
2
- pre {
3
- position: relative;
4
- }
5
-
6
- pre .btnIcon {
7
- position: absolute;
8
- top: 4px;
9
- z-index: 2;
10
- cursor: pointer;
11
- border: 1px solid transparent;
12
- padding: 0;
13
- color: $primaryColor;
14
- background-color: transparent;
15
- height: 30px;
16
- transition: all .25s ease-out;
17
- }
18
-
19
- pre .btnIcon:hover {
20
- text-decoration: none;
21
- }
22
-
23
- .btnIcon__body {
24
- align-items: center;
25
- display: flex;
26
- }
27
-
28
- .btnIcon svg {
29
- fill: currentColor;
30
- margin-right: .4em;
31
- }
32
-
33
- .btnIcon__label {
34
- font-size: 11px;
35
- }
36
-
37
- .btnClipboard {
38
- right: 10px;
39
- }
@@ -1,245 +0,0 @@
1
- .index-container h2, h1 {
2
- color: $primaryColor;
3
- }
4
-
5
- .splash-container {
6
- background: linear-gradient(180deg, aliceblue 0%, #FFFFFF 74.48%);;
7
- }
8
-
9
- .splash-container h1 {
10
- margin-top: 10%;
11
- font-size: 48px;
12
- }
13
-
14
- .splash-container .description-container {
15
- font-size: 24px;
16
- color: $primaryColor;
17
- padding-bottom: 40px;
18
- }
19
-
20
- .splash-container .button, .productShowcaseSection .button {
21
- font-size: 24px;
22
- padding: 20px 40px;
23
- border: none;
24
- background: #83BF4A;
25
- color: #fff;
26
- transition: background 0.3s, color 0.3s;
27
- }
28
-
29
- .splash-container .button:hover, .productShowcaseSection .button:hover {
30
- background: hsl(91, 70%, 57%);
31
- color: #fff;
32
- }
33
-
34
- /* Buttons */
35
-
36
- .button {
37
- font-size: 18px;
38
- padding: 16px;
39
- text-transform: none;
40
- }
41
-
42
-
43
- /* index code colors */
44
-
45
- .yaml-key {
46
- color: #a3db46;
47
- }
48
-
49
- .yaml-syntax {
50
- color: #cccccc;
51
- }
52
-
53
- .yaml-value {
54
- color: hsl(194, 78%, 51%);
55
- }
56
-
57
- .terminal-highlight {
58
- color: red;
59
- }
60
-
61
- .showcaseBackground {
62
- background: $lightColor;
63
- }
64
-
65
- /* code */
66
-
67
- .code-container {
68
- font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
69
- }
70
-
71
- .code-top {
72
- background: $primaryColor;
73
- color: white;
74
- padding: 10px;
75
- border-top-left-radius: 10px;
76
- border-top-right-radius: 10px;
77
- }
78
-
79
- .code-content {
80
- width: 100%;
81
- padding: 10px;
82
- margin: 0;
83
- background: hsl(210, 5%, 30%);
84
- color: hsl(0, 0%, 70%);
85
- overflow-y: scroll;
86
- }
87
-
88
- .code-result {
89
- color: hsl(0, 0%, 100%);
90
- background: hsl(0, 0%, 10%);
91
- padding: 10px;
92
- }
93
-
94
- .code-terminal {
95
- background: hsl(30, 12%, 7%);
96
- margin: 0;
97
- padding: 10px 10px 15px 10px;
98
- border-bottom-left-radius: 10px;
99
- border-bottom-right-radius: 10px;
100
- }
101
-
102
- .code-terminal p {
103
- color: hsl(0, 0%, 70%);
104
- }
105
-
106
- .code-container {
107
- width: 60%;
108
- }
109
-
110
- .description-container {
111
- width: 40%;
112
- text-align: left;
113
- padding-right: 40px;
114
- }
115
-
116
- .section-container {
117
- background: #eaeef3;
118
- }
119
-
120
- .section-container, .feature-container {
121
- padding: 60px;
122
- }
123
-
124
- .section-container, .splash-container, .center-container {
125
- display: flex;
126
- justify-content: center;
127
- }
128
-
129
- .section-grid {
130
- display: flex;
131
- justify-content: space-between;
132
- flex-wrap: wrap;
133
- }
134
-
135
- .section-card {
136
- max-width: 30%;
137
- padding-bottom: 40px;
138
- }
139
-
140
- .feature-container {
141
- display: flex;
142
- justify-content: space-between;
143
- }
144
-
145
- blockquote {
146
- background-color: rgba(201, 255, 174, 0.3);
147
- border-left: 8px solid #d7ff95;
148
- padding: 15px 30px 15px 15px;
149
- }
150
-
151
- /* navigation */
152
-
153
- .toc .toggleNav .navGroup .navGroupCategoryTitle {
154
- display: none;
155
- }
156
-
157
- .toc .toggleNav ul li a {
158
- border: none;
159
- color: #717171;
160
- display: block;
161
- font-size: 16px;
162
- font-weight: 600;
163
- padding: 4px 0;
164
- transition: color 0.3s;
165
- }
166
-
167
- .onPageNav {
168
- flex: 0 0 280px;
169
- }
170
-
171
- .onPageNav ul li {
172
- font-size: 16px;
173
- line-height: 24px;
174
- padding-bottom: 8px;
175
- }
176
-
177
- .separateOnPageNav .docsNavContainer {
178
- flex: 0 0 140px;
179
- }
180
-
181
- @media only screen and (min-width: 1400px) {
182
-
183
- .section-grid {
184
- max-width: 1360px;
185
- }
186
-
187
- .feature-container {
188
- width: 1480px;
189
- }
190
-
191
- }
192
-
193
- @media only screen and (max-width: 1500px) {
194
-
195
- .section-grid {
196
- max-width: 1060px;
197
- }
198
-
199
- .feature-container {
200
- width: 1180px;
201
- }
202
- }
203
-
204
- @media only screen and (max-width: 1023px) {
205
-
206
- .splash-container h1 {
207
- margin-top: 20px;
208
- font-size: 48px;
209
- }
210
-
211
- .splash-container .description-container {
212
- text-align: center;
213
- }
214
-
215
- .code-container {
216
- width: 99.5%;
217
- }
218
-
219
- .description-container {
220
- width: 100%;
221
- max-width: 40em;
222
- padding-right: 0;
223
- }
224
-
225
- .feature-container {
226
- display: block;
227
- min-width: 300px;
228
- }
229
-
230
- .section-container, .section-container, .feature-container {
231
- padding: 20px;
232
- }
233
- }
234
-
235
- @media only screen and (max-width: 735px) {
236
-
237
- .description-container {
238
- text-align: left;
239
- }
240
-
241
- .section-card {
242
- max-width: 100%;
243
- }
244
-
245
- }