@iobroker/repochecker 4.3.0-alpha.0 → 5.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,6 +31,9 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca
31
31
  Placeholder for the next version (at the beginning of the line):
32
32
  ### **WORK IN PROGRESS**
33
33
  -->
34
+ ### 5.0.0-alpha.0 (2025-09-29)
35
+ - (@copilot) Renumbered all error, warning and suggestion codes from 3-digit to 4-digit format according to new numbering system
36
+
34
37
  ### 4.3.0-alpha.0 (2025-09-29)
35
38
  - (@copilot) Added version format validation check (E061) for invalid semver format according to ioBroker requirements
36
39
  - (@copilot) Added structured GitHub issue templates for bug reports, false positives, new checks, check changes, and enhancements
package/doc/issues.json CHANGED
@@ -1,7 +1,4 @@
1
1
  {
2
- "E000": {
3
- "title": "FATAL: cannot access repository ${context.githubUrlApi}"
4
- },
5
2
  "E001": {
6
3
  "_comment": "all texts can be string or object with language translations",
7
4
  "title": {
@@ -446,9 +443,6 @@
446
443
  "E903": {
447
444
  "title": "iob_npm.done not found in .gitignore"
448
445
  },
449
- "E999": {
450
- "title": "GLOBAL ERROR: ${err.toString()}, ${JSON.stringify(err)}"
451
- },
452
446
  "W105": {
453
447
  "title": "`common.titleLang` should be translated into all supported languages"
454
448
  },
package/index.js CHANGED
@@ -20,16 +20,16 @@ const version = require('./package.json').version;
20
20
  // include submodules
21
21
  const common = require('./lib/common.js');
22
22
  const config = require('./lib/config.js');
23
- const M000_PackageJson = require('./lib/M000_PackageJson.js');
24
- const M100_IOPackageJson = require('./lib/M100_IOPackageJson.js');
25
- const M250_Npm = require('./lib/M250_Npm.js');
26
- const M300_Testing = require('./lib/M300_Testing.js');
27
- const M400_Repository = require('./lib/M400_Repository.js');
28
- const M500_Code = require('./lib/M500_Code.js');
29
- const M600_Readme = require('./lib/M600_Readme.js');
30
- const M700_License = require('./lib/M700_License.js');
31
- const M800_Github = require('./lib/M800_Github.js');
32
- const M900_GitNpmIgnore = require('./lib/M900_GitNpmIgnore.js');
23
+ const M0000_PackageJson = require('./lib/M0000_PackageJson.js');
24
+ const M1000_IOPackageJson = require('./lib/M1000_IOPackageJson.js');
25
+ const M2000_Npm = require('./lib/M2000_Npm.js');
26
+ const M3000_Testing = require('./lib/M3000_Testing.js');
27
+ const M4000_Repository = require('./lib/M4000_Repository.js');
28
+ const M5000_Code = require('./lib/M5000_Code.js');
29
+ const M6000_Readme = require('./lib/M6000_Readme.js');
30
+ const M7000_License = require('./lib/M7000_License.js');
31
+ const M8000_Github = require('./lib/M8000_Github.js');
32
+ const M9000_GitNpmIgnore = require('./lib/M9000_GitNpmIgnore.js');
33
33
 
34
34
  // disable axios caching
35
35
  // axios.defaults.headers = {
@@ -39,34 +39,34 @@ const M900_GitNpmIgnore = require('./lib/M900_GitNpmIgnore.js');
39
39
  // };
40
40
 
41
41
  // Error ranges
42
- // E0xx
42
+ // 0001 - 0999
43
43
  // check package.json
44
44
  //
45
- // E100 - 249
45
+ // 1000 - 1999
46
46
  // check io-package.json
47
47
  //
48
- // E250 - 299
48
+ // 2000 - 2999
49
49
  // check npm and npmjs.org
50
50
  //
51
- // E3xx
51
+ // 3000 - 3999
52
52
  // check testing
53
53
  //
54
- // E4xx
54
+ // 4000 - 4999
55
55
  // check repositories
56
56
  //
57
- // E5xx
57
+ // 5000 - 5999
58
58
  // check code
59
59
  //
60
- // E6xx
60
+ // 6000 - 6999
61
61
  // check README file
62
62
  //
63
- // E7xx
63
+ // 7000 - 7000
64
64
  // check license file
65
65
  //
66
- // E8xx
66
+ // 8000 - 8999
67
67
  // check github repository
68
68
  //
69
- // E9xx
69
+ // 9000 - 9998
70
70
  // check .gitignore file
71
71
 
72
72
  function getGithubApiData(context) {
@@ -92,7 +92,7 @@ function getGithubApiData(context) {
92
92
  resolve(context);
93
93
  })
94
94
  .catch(e => {
95
- context.errors.push(`[E000] FATAL: cannot access repository ${context.githubUrlApi}`);
95
+ context.errors.push(`[E0000] FATAL: cannot access repository ${context.githubUrlApi}`);
96
96
  reject(e);
97
97
  }); // E0xx
98
98
  });
@@ -144,22 +144,22 @@ function check(request, ctx, callback) {
144
144
  context.repository = githubUrl.replace('https://github.com/', '');
145
145
 
146
146
  getGithubApiData(context)
147
- .then(context => M800_Github.getCommitInfos(context))
148
- .then(context => M000_PackageJson.getPackageJson(context))
149
- .then(context => M100_IOPackageJson.getIOPackageJson(context))
147
+ .then(context => M8000_Github.getCommitInfos(context))
148
+ .then(context => M0000_PackageJson.getPackageJson(context))
149
+ .then(context => M1000_IOPackageJson.getIOPackageJson(context))
150
150
  .then(context => config.updateConfig(context))
151
151
  .then(context => config.logEnvironment(context))
152
- .then(context => M000_PackageJson.checkPackageJson(context))
153
- .then(context => M100_IOPackageJson.checkIOPackageJson(context))
154
- .then(context => M250_Npm.checkNpm(context))
155
- .then(context => M400_Repository.checkRepository(context))
156
- .then(context => M500_Code.checkCode(context))
157
- .then(context => M300_Testing.checkTests(context))
158
- .then(context => M800_Github.checkGithubRepo(context))
159
- .then(context => M600_Readme.checkReadme(context))
160
- .then(context => M700_License.checkLicenseFile(context))
161
- .then(context => M900_GitNpmIgnore.checkNpmIgnore(context))
162
- .then(context => M900_GitNpmIgnore.checkGitIgnore(context))
152
+ .then(context => M0000_PackageJson.checkPackageJson(context))
153
+ .then(context => M1000_IOPackageJson.checkIOPackageJson(context))
154
+ .then(context => M2000_Npm.checkNpm(context))
155
+ .then(context => M4000_Repository.checkRepository(context))
156
+ .then(context => M5000_Code.checkCode(context))
157
+ .then(context => M3000_Testing.checkTests(context))
158
+ .then(context => M8000_Github.checkGithubRepo(context))
159
+ .then(context => M6000_Readme.checkReadme(context))
160
+ .then(context => M7000_License.checkLicenseFile(context))
161
+ .then(context => M9000_GitNpmIgnore.checkNpmIgnore(context))
162
+ .then(context => M9000_GitNpmIgnore.checkGitIgnore(context))
163
163
  .then(context => {
164
164
  return callback(
165
165
  null,
@@ -176,7 +176,7 @@ function check(request, ctx, callback) {
176
176
  })
177
177
  .catch(err => {
178
178
  console.error(`GLOBAL ERROR: ${err.toString()}, ${JSON.stringify(err)}`);
179
- context.errors.push(`[E999] GLOBAL ERROR: ${err.toString()}, ${JSON.stringify(err)}`);
179
+ context.errors.push(`[E9999] GLOBAL ERROR: ${err.toString()}, ${JSON.stringify(err)}`);
180
180
 
181
181
  return callback(
182
182
  null,