@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.
@@ -3,7 +3,7 @@
3
3
  This module is a support module for iobroker.repochecker
4
4
 
5
5
  Area checked: Adapter Code
6
- Numbering : 500 - 549
6
+ Numbering : 5000 - 5499
7
7
 
8
8
  */
9
9
 
@@ -14,7 +14,7 @@ const compareVersions = require('compare-versions');
14
14
  const JSON5 = require('json5');
15
15
 
16
16
  const common = require('./common.js');
17
- const M500__jsonConfig = require('./M500__JsonConfig.js');
17
+ const M5500__jsonConfig = require('./M5500__JsonConfig.js');
18
18
 
19
19
  // utility to parse words.js
20
20
  function extractWords(words) {
@@ -67,7 +67,7 @@ function getAllFiles(context, dirPath, root, filesList) {
67
67
 
68
68
  // E5xx
69
69
  async function checkCode(context) {
70
- console.log('\n[E500 - E599] checkCode');
70
+ console.log('\n[E5000 - E5999] checkCode');
71
71
 
72
72
  const readFiles = [
73
73
  '/.npmignore',
@@ -173,7 +173,7 @@ async function checkCode(context) {
173
173
  const found = [];
174
174
  if (fileName.match(/^\/node_modules\//) && !found.includes('node_module')) {
175
175
  context.errors.push(
176
- '[E500] Directory node_modules found in root of repository. Please delete directory.',
176
+ '[E5000] Directory node_modules found in root of repository. Please delete directory.',
177
177
  );
178
178
  found.push('node_modules');
179
179
  }
@@ -251,7 +251,7 @@ async function checkCode(context) {
251
251
  (context.ioPackageJson.common.adminUI.config !== 'json' &&
252
252
  context.ioPackageJson.common.adminUI.config !== 'none'))
253
253
  ) {
254
- context.warnings.push('[S522] Please consider migrating to admin 5 UI (jsonConfig).');
254
+ context.warnings.push('[S5022] Please consider migrating to admin 5 UI (jsonConfig).');
255
255
  }
256
256
 
257
257
  if (
@@ -263,7 +263,7 @@ async function checkCode(context) {
263
263
  context['/admin/index_m.html'].includes('selectID.js') &&
264
264
  !context.filesList.includes('/admin/img/info-big.png')
265
265
  ) {
266
- context.errors.push('[E502] "/admin/img/info-big.png" not found, but selectID.js used in index_m.html ');
266
+ context.errors.push('[E5002] "/admin/img/info-big.png" not found, but selectID.js used in index_m.html ');
267
267
  }
268
268
 
269
269
  if (context['/admin/words.js']) {
@@ -273,18 +273,18 @@ async function checkCode(context) {
273
273
  const problem = Object.keys(words).filter(word => !words[word].de || !words[word].ru);
274
274
  if (problem.length > 3) {
275
275
  context.errors.push(
276
- `[E506] More non translated in german or russian words found in admin/words.js. You can use https://translator.iobroker.in/ for translations`,
276
+ `[E5006] More non translated in german or russian words found in admin/words.js. You can use https://translator.iobroker.in/ for translations`,
277
277
  );
278
278
  } else {
279
279
  problem.forEach(word => {
280
280
  if (!words[word].de) {
281
281
  context.errors.push(
282
- `[E506] Word "${word}" is not translated to german in admin/words.js. You can use https://translator.iobroker.in/ for translations`,
282
+ `[E5006] Word "${word}" is not translated to german in admin/words.js. You can use https://translator.iobroker.in/ for translations`,
283
283
  );
284
284
  }
285
285
  if (!words[word].ru) {
286
286
  context.errors.push(
287
- `[E506] Word "${word}" is not translated to russian in admin/words.js. You can use https://translator.iobroker.in/ for translations`,
287
+ `[E5006] Word "${word}" is not translated to russian in admin/words.js. You can use https://translator.iobroker.in/ for translations`,
288
288
  );
289
289
  }
290
290
  });
@@ -304,12 +304,12 @@ async function checkCode(context) {
304
304
  : JSON5.parse(context['/admin/jsonConfig.json5']);
305
305
  } catch (e) {
306
306
  context.errors.push(
307
- `[E507] Cannot parse "/admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}": ${e}`,
307
+ `[E5007] Cannot parse "/admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}": ${e}`,
308
308
  );
309
309
  }
310
310
  } else {
311
311
  context.errors.push(
312
- `[E508] "admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}" not found, but admin support is declared`,
312
+ `[E5008] "admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}" not found, but admin support is declared`,
313
313
  );
314
314
  }
315
315
 
@@ -320,27 +320,27 @@ async function checkCode(context) {
320
320
  try {
321
321
  JSON.parse(context[`/admin/i18n/${lang}/translations.json`]);
322
322
  } catch (e) {
323
- context.errors.push(`[E509] Cannot parse "admin/i18n/${lang}/translations.json": ${e}`);
323
+ context.errors.push(`[E5009] Cannot parse "admin/i18n/${lang}/translations.json": ${e}`);
324
324
  }
325
325
  } else if (context[`/admin/i18n/${lang}.json`]) {
326
326
  try {
327
327
  JSON.parse(context[`/admin/i18n/${lang}.json`]);
328
328
  } catch (e) {
329
- context.errors.push(`[E509] Cannot parse "admin/i18n/${lang}.json": ${e}`);
329
+ context.errors.push(`[E5009] Cannot parse "admin/i18n/${lang}.json": ${e}`);
330
330
  }
331
331
  } else {
332
332
  context.errors.push(
333
- `[E510] "/admin/i18n/${lang}/translations.json" or "admin/i18n/${lang}.json" not found, but admin support is declared. Please add.`,
333
+ `[E5010] "/admin/i18n/${lang}/translations.json" or "admin/i18n/${lang}.json" not found, but admin support is declared. Please add.`,
334
334
  );
335
335
  }
336
336
  });
337
337
  } else if (jsonConfig.i18n === false) {
338
- context.warnings.push(`[W515] Why did you decide to disable i18n support?`);
338
+ context.warnings.push(`[W5015] Why did you decide to disable i18n support?`);
339
339
  } else {
340
- context.warnings.push(`[W522] Why did you decide not to use i18n support?`);
340
+ context.warnings.push(`[W5022] Why did you decide not to use i18n support?`);
341
341
  }
342
342
 
343
- M500__jsonConfig.checkJsonConfig(
343
+ M5500__jsonConfig.checkJsonConfig(
344
344
  context,
345
345
  `admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}`,
346
346
  jsonConfig,
@@ -360,29 +360,29 @@ async function checkCode(context) {
360
360
  : JSON5.parse(context['/admin/jsonCustom.json5']);
361
361
  } catch (e) {
362
362
  context.errors.push(
363
- `[E511] Cannot parse "/admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}": ${e}`,
363
+ `[E5011] Cannot parse "/admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}": ${e}`,
364
364
  );
365
365
  }
366
366
  } else {
367
367
  context.errors.push(
368
- `[E512] "/admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}" not found, but custom support is declared`,
368
+ `[E5012] "/admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}" not found, but custom support is declared`,
369
369
  );
370
370
  }
371
371
  }
372
372
 
373
373
  if (context.ioPackageJson.common.blockly && !context['/admin/blockly.js']) {
374
- context.errors.push('[E514] "/admin/blockly.js" not found, but blockly support is declared');
374
+ context.errors.push('[E5014] "/admin/blockly.js" not found, but blockly support is declared');
375
375
  }
376
376
 
377
377
  if (context.ioPackageJson.common.javascriptRules) {
378
378
  if (!context.ioPackageJson.common.javascriptRules.url) {
379
379
  context.errors.push(
380
- '[E517] JavaScript-Rules support is declared, but no location in property common.javascriptRules.url defined',
380
+ '[E5017] JavaScript-Rules support is declared, but no location in property common.javascriptRules.url defined',
381
381
  );
382
382
  }
383
383
  if (!context.filesList.includes(`/admin/${context.ioPackageJson.common.javascriptRules.url}`)) {
384
384
  context.errors.push(
385
- `[E516] "/admin/${context.ioPackageJson.common.javascriptRules.url}" not found, but JavaScript-Rules support is declared`,
385
+ `[E5016] "/admin/${context.ioPackageJson.common.javascriptRules.url}" not found, but JavaScript-Rules support is declared`,
386
386
  );
387
387
  }
388
388
  }
@@ -391,13 +391,13 @@ async function checkCode(context) {
391
391
 
392
392
  forbiddenFiles.forEach(file => {
393
393
  if (context.filesList.includes(file)) {
394
- context.errors.push(`[E503] File "${file}" found in repo! Please remove file.`);
394
+ context.errors.push(`[E5003] File "${file}" found in repo! Please remove file.`);
395
395
  }
396
396
  });
397
397
 
398
398
  if (!context.filesList.includes('/package-lock.json')) {
399
399
  context.warnings.push(
400
- '[S523] "package-lock.json" not found in repo! Please consider to commit it to github repository.',
400
+ '[S5023] "package-lock.json" not found in repo! Please consider to commit it to github repository.',
401
401
  );
402
402
  }
403
403
 
@@ -408,24 +408,24 @@ async function checkCode(context) {
408
408
  if (context['/gulpfile.js']) {
409
409
  if (!context.packageJson.devDependencies['gulp']) {
410
410
  context.warnings.push(
411
- '[W520] "gulpfile.js" found in repo but "gulp" not found at devDependencies at package.json. Check whether it can be removed.',
411
+ '[W5020] "gulpfile.js" found in repo but "gulp" not found at devDependencies at package.json. Check whether it can be removed.',
412
412
  );
413
413
  } else if (!usesReact) {
414
414
  // Check if @iobroker/adapter-dev is present in devDependencies
415
415
  if (context.packageJson.devDependencies && context.packageJson.devDependencies['@iobroker/adapter-dev']) {
416
416
  context.warnings.push(
417
- '[S531] "gulpfile.js" found in repo while @iobroker/adapter-dev already used. Please check if gulp is still needed.',
417
+ '[S5031] "gulpfile.js" found in repo while @iobroker/adapter-dev already used. Please check if gulp is still needed.',
418
418
  );
419
419
  } else {
420
420
  context.warnings.push(
421
- '[W513] "gulpfile.js" found in repo! Think about migrating to @iobroker/adapter-dev package',
421
+ '[W5013] "gulpfile.js" found in repo! Think about migrating to @iobroker/adapter-dev package',
422
422
  );
423
423
  }
424
424
  }
425
425
  } else {
426
426
  if (context.packageJson.devDependencies['gulp']) {
427
427
  context.warnings.push(
428
- '[W521] "gulp" found at devDependencies at package.json but no "gulpfile.js" found. Is this dependency really required?',
428
+ '[W5021] "gulp" found at devDependencies at package.json but no "gulpfile.js" found. Is this dependency really required?',
429
429
  );
430
430
  }
431
431
  }
@@ -435,7 +435,7 @@ async function checkCode(context) {
435
435
  if (compareVersions.compareVersions(version, '3.0.0') >= 0) {
436
436
  if (!context['/.releaseconfig.json']) {
437
437
  context.errors.push(
438
- '[E518] "@alcalzone/release-script" (>=3.0.0) is used, but ".releaseconfig.json" not found. Please create.',
438
+ '[E5018] "@alcalzone/release-script" (>=3.0.0) is used, but ".releaseconfig.json" not found. Please create.',
439
439
  );
440
440
  } else {
441
441
  common.debug(`context[/.releaseconfig.json: ${context['/.releaseconfig.json']}`);
@@ -447,35 +447,37 @@ async function checkCode(context) {
447
447
  common.debug(`plugins: ${plugins}`);
448
448
  if (!context.packageJson.devDependencies['@alcalzone/release-script-plugin-iobroker']) {
449
449
  context.errors.push(
450
- '[E524] "@alcalzone/release-script" requires plugin "@alcalzone/release-script-plugin-iobroker". Please add.',
450
+ '[E5024] "@alcalzone/release-script" requires plugin "@alcalzone/release-script-plugin-iobroker". Please add.',
451
451
  );
452
452
  } else {
453
453
  if (!plugins.includes('iobroker')) {
454
- context.errors.push('[E527] Plugin "iobroker" missing at .releaseconfig.json. Please add.');
454
+ context.errors.push(
455
+ '[E5027] Plugin "iobroker" missing at .releaseconfig.json. Please add.',
456
+ );
455
457
  }
456
458
  }
457
459
  if (!context.packageJson.devDependencies['@alcalzone/release-script-plugin-license']) {
458
460
  context.errors.push(
459
- '[E525] "@alcalzone/release-script" requires plugin "@alcalzone/release-script-plugin-license". Please add.',
461
+ '[E5025] "@alcalzone/release-script" requires plugin "@alcalzone/release-script-plugin-license". Please add.',
460
462
  );
461
463
  } else {
462
464
  if (!plugins.includes('license')) {
463
- context.errors.push('[E528] Plugin "license" missing at .releaseconfig.json. Please add.');
465
+ context.errors.push('[E5028] Plugin "license" missing at .releaseconfig.json. Please add.');
464
466
  }
465
467
  }
466
468
  if (!context.packageJson.devDependencies['@alcalzone/release-script-plugin-manual-review']) {
467
469
  context.warnings.push(
468
- '[S526] Consider adding plugin "@alcalzone/release-script-plugin-manual-review".',
470
+ '[S5026] Consider adding plugin "@alcalzone/release-script-plugin-manual-review".',
469
471
  );
470
472
  } else {
471
473
  if (!plugins.includes('manual-review')) {
472
474
  context.warnings.push(
473
- '[W529] Plugin "manual-review" missing at .releaseconfig.json. Please add.',
475
+ '[W5029] Plugin "manual-review" missing at .releaseconfig.json. Please add.',
474
476
  );
475
477
  }
476
478
  }
477
479
  } catch (e) {
478
- context.errors.push(`[E530] .releaseconfig.json is no valid json file - ${e}.`);
480
+ context.errors.push(`[E5030] .releaseconfig.json is no valid json file - ${e}.`);
479
481
  }
480
482
  }
481
483
  }
@@ -485,7 +487,7 @@ async function checkCode(context) {
485
487
  if (!context[`/${context.packageJson.main}`]) {
486
488
  if (!context.ioPackageJson.common.nogit) {
487
489
  context.errors.push(
488
- `[E519] "${context.packageJson.main}" found in package.json, but not found as file`,
490
+ `[E5019] "${context.packageJson.main}" found in package.json, but not found as file`,
489
491
  );
490
492
  }
491
493
  } else {
@@ -496,11 +498,11 @@ async function checkCode(context) {
496
498
  if (context.ioPackageJson.common.compact) {
497
499
  // if compact mode supported, it is critical
498
500
  context.errors.push(
499
- `[E504] setInterval found in "${context.packageJson.main}", but no clearInterval detected`,
501
+ `[E5004] setInterval found in "${context.packageJson.main}", but no clearInterval detected`,
500
502
  );
501
503
  } else {
502
504
  context.warnings.push(
503
- `[W504] setInterval found in "${context.packageJson.main}", but no clearInterval detected`,
505
+ `[W5004] setInterval found in "${context.packageJson.main}", but no clearInterval detected`,
504
506
  );
505
507
  }
506
508
  }
@@ -510,13 +512,13 @@ async function checkCode(context) {
510
512
  ) {
511
513
  if (context.ioPackageJson.common.compact) {
512
514
  // if compact mode supported, it is critical
513
- // context.errors.push(`[E505] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected`);
515
+ // context.errors.push(`[E5005] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected`);
514
516
  context.warnings.push(
515
- `[W505] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected`,
517
+ `[W5005] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected`,
516
518
  );
517
519
  } else {
518
520
  context.warnings.push(
519
- `[W505] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected`,
521
+ `[W5005] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected`,
520
522
  );
521
523
  }
522
524
  }
@@ -547,7 +549,9 @@ async function checkCode(context) {
547
549
  }
548
550
 
549
551
  if (!isUsed) {
550
- context.warnings.push('[S532] "lib/tools.js" found in repo but not used anywhere. Consider removing file.');
552
+ context.warnings.push(
553
+ '[S5032] "lib/tools.js" found in repo but not used anywhere. Consider removing file.',
554
+ );
551
555
  }
552
556
  }
553
557
 
@@ -707,7 +711,7 @@ async function checkCode(context) {
707
711
  // Only warn if we're in an adapter class context
708
712
  if (isInAdapterClassContext(lines, i)) {
709
713
  context.warnings.push(
710
- `[W533] method "${method}()" is deprecated and will be removed with future js-controller version. Please use "set/deleteObject()" instead.`,
714
+ `[W5033] method "${method}()" is deprecated and will be removed with future js-controller version. Please use "set/deleteObject()" instead.`,
711
715
  );
712
716
  reportedMethods.add(method);
713
717
  break; // Only warn once per line
@@ -726,7 +730,7 @@ async function checkCode(context) {
726
730
  // Warn if we're NOT in an adapter class context (outside any class)
727
731
  if (!isInAdapterClassContext(lines, i)) {
728
732
  context.warnings.push(
729
- `[W533] method "${method}()" is deprecated and will be removed with future js-controller version. Please use "set/deleteObject()" instead.`,
733
+ `[W5033] method "${method}()" is deprecated and will be removed with future js-controller version. Please use "set/deleteObject()" instead.`,
730
734
  );
731
735
  reportedMethods.add(method);
732
736
  break; // Only warn once per line
@@ -749,45 +753,45 @@ exports.checkCode = checkCode;
749
753
  // List of error and warnings used at this module
750
754
  // ----------------------------------------------
751
755
 
752
- // [500] node_modules found in repo. Please delete it
753
- // [501] Cannot get ${context.branch}.zip on github
754
- // [502] "admin/img/info-big.png" not found, but selectID.js used in index_m.html
755
- // [503] File "${file}" found in repo! Please remove file.
756
- // [504] setInterval found in "${context.packageJson.main}", but no clearInterval detected
757
- // [504] setInterval found in "${context.packageJson.main}", but no clearInterval detected
758
- // [505] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected
759
- // [505] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected
760
- // [505] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected
761
- // [506] More non translated in german or russian words found in admin/words.js. You can use https://translator.iobroker.in/ for translations
762
- // [506] Word "${word}" is not translated to german in admin/words.js. You can use https://translator.iobroker.in/ for translations
763
- // [506] Word "${word}" is not translated to russian in admin/words.js. You can use https://translator.iobroker.in/ for translations
764
- // [507] Cannot parse "admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}": ${e}
765
- // [508] "admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}" not found, but admin support is declared
766
- // [509] Cannot parse "admin/i18n/${lang}.json": ${e}
767
- // [509] Cannot parse "admin/i18n/${lang}/translations.json": ${e}
768
- // [510] "/admin/i18n/${lang}/translations.json" or "admin/i18n/${lang}.json" not found, but admin support is declared. Please add.
769
- // [511] Cannot parse "admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}": ${e}
770
- // [512] "admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}" not found, but custom support is declared
771
- // [513] "gulpfile.js" found in repo! Think about migrating to @iobroker/adapter-dev package
772
- // [514] "admin/blockly.js" not found, but blockly support is declared
773
- // [515] Why did you decide to disable i18n support?
774
- // [516] "${context.ioPackageJson.common.javascriptRules.url}" not found, but JavaScript-Rules support is declared
775
- // [517] JavaScript-Rules support is declared, but no location in property common.javascriptRules.url defined
776
- // [518] "@alcalzone/release-script" (>=3.0.0) is used, but ".releaseconfig.json" not found. Please create.
777
- // [519] "${context.packageJson.main}" found in package.json, but not found as file
778
- // [520] "gulpfile.js" found in repo but "gulp" not found at devDependencies at package.json. Check whether it can be removed.
779
- // [521] "gulp" found at devDependencies at package.json but no "gulpfile.js" found. Is this dependency really required?
780
- // [522] "Why did you decide not to use i18n support?"
781
- // [523] "package-lock.json" not found in repo! Please remove from .gitignore!
782
- // [524] "@alcalzone/release-script" requires plugin "@alcalzone/release-script-plugin-iobroker". Please add.
783
- // [525] "@alcalzone/release-script" requires plugin "@alcalzone/release-script-plugin-license". Please add.
784
- // [526] Consider adding plugin "@alcalzone/release-script-plugin-manual-review".
785
- // [527] Plugin "iobroker" missing at .releaseconfig.json. Please add.
786
- // [528] Plugin "license" missing at .releaseconfig.json. Please add.
787
- // [529] Plugin "manual-review" missing at .releaseconfig.json. Please add.
788
- // [530] .releaseconfig.json is no valid json file - ${e}.
789
- // [531] "gulpfile.js" found in repo with @iobroker/adapter-dev. Check if gulp is still needed.
790
- // [532] "lib/tools.js" found in repo but not used anywhere. Consider removing this outdated file.
791
- // [533] method "${method}()" is deprecated and will be removed with future js-controller version. Please use "set/deleteObject()" instead.
756
+ // [5000] node_modules found in repo. Please delete it
757
+ // [5001] Cannot get ${context.branch}.zip on github
758
+ // [5002] "admin/img/info-big.png" not found, but selectID.js used in index_m.html
759
+ // [5003] File "${file}" found in repo! Please remove file.
760
+ // [5004] setInterval found in "${context.packageJson.main}", but no clearInterval detected
761
+ // [5004] setInterval found in "${context.packageJson.main}", but no clearInterval detected
762
+ // [5005] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected
763
+ // [5005] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected
764
+ // [5005] setTimeout found in "${context.packageJson.main}", but no clearTimeout detected
765
+ // [5006] More non translated in german or russian words found in admin/words.js. You can use https://translator.iobroker.in/ for translations
766
+ // [5006] Word "${word}" is not translated to german in admin/words.js. You can use https://translator.iobroker.in/ for translations
767
+ // [5006] Word "${word}" is not translated to russian in admin/words.js. You can use https://translator.iobroker.in/ for translations
768
+ // [5007] Cannot parse "admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}": ${e}
769
+ // [5008] "admin/jsonConfig.json${context['/admin/jsonConfig.json'] ? '' : '5'}" not found, but admin support is declared
770
+ // [5009] Cannot parse "admin/i18n/${lang}.json": ${e}
771
+ // [5009] Cannot parse "admin/i18n/${lang}/translations.json": ${e}
772
+ // [5010] "/admin/i18n/${lang}/translations.json" or "admin/i18n/${lang}.json" not found, but admin support is declared. Please add.
773
+ // [5011] Cannot parse "admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}": ${e}
774
+ // [5012] "admin/jsonCustom.json${context['/admin/jsonCustom.json'] ? '' : '5'}" not found, but custom support is declared
775
+ // [5013] "gulpfile.js" found in repo! Think about migrating to @iobroker/adapter-dev package
776
+ // [5014] "admin/blockly.js" not found, but blockly support is declared
777
+ // [5015] Why did you decide to disable i18n support?
778
+ // [5016] "${context.ioPackageJson.common.javascriptRules.url}" not found, but JavaScript-Rules support is declared
779
+ // [5017] JavaScript-Rules support is declared, but no location in property common.javascriptRules.url defined
780
+ // [5018] "@alcalzone/release-script" (>=3.0.0) is used, but ".releaseconfig.json" not found. Please create.
781
+ // [5019] "${context.packageJson.main}" found in package.json, but not found as file
782
+ // [5020] "gulpfile.js" found in repo but "gulp" not found at devDependencies at package.json. Check whether it can be removed.
783
+ // [5021] "gulp" found at devDependencies at package.json but no "gulpfile.js" found. Is this dependency really required?
784
+ // [5022] "Why did you decide not to use i18n support?"
785
+ // [5023] "package-lock.json" not found in repo! Please remove from .gitignore!
786
+ // [5024] "@alcalzone/release-script" requires plugin "@alcalzone/release-script-plugin-iobroker". Please add.
787
+ // [5025] "@alcalzone/release-script" requires plugin "@alcalzone/release-script-plugin-license". Please add.
788
+ // [5026] Consider adding plugin "@alcalzone/release-script-plugin-manual-review".
789
+ // [5027] Plugin "iobroker" missing at .releaseconfig.json. Please add.
790
+ // [5028] Plugin "license" missing at .releaseconfig.json. Please add.
791
+ // [5029] Plugin "manual-review" missing at .releaseconfig.json. Please add.
792
+ // [5030] .releaseconfig.json is no valid json file - ${e}.
793
+ // [5031] "gulpfile.js" found in repo with @iobroker/adapter-dev. Check if gulp is still needed.
794
+ // [5032] "lib/tools.js" found in repo but not used anywhere. Consider removing this outdated file.
795
+ // [5033] method "${method}()" is deprecated and will be removed with future js-controller version. Please use "set/deleteObject()" instead.
792
796
 
793
797
  // [550 - ] see M500_jsonConfig.js
@@ -3,7 +3,7 @@
3
3
  This module is a support module for iobroker.repochecker
4
4
 
5
5
  Area checked: Adapter Code
6
- Numbering : 550 - 599
6
+ Numbering : 5500 - 5999
7
7
 
8
8
  Extension to check jsonConfig
9
9
 
@@ -127,7 +127,7 @@ function handleResponsiveError(context, msg) {
127
127
  responsiveErrorLimit--;
128
128
  if (responsiveErrorLimit === 0) {
129
129
  context.errors.push(
130
- `[E560] responsive check: maximum issues reached, please fix reported ones and recheck`,
130
+ `[E5510] responsive check: maximum issues reached, please fix reported ones and recheck`,
131
131
  );
132
132
  }
133
133
  }
@@ -139,7 +139,7 @@ function handleResponsiveWarning(context, msg) {
139
139
  responsiveWarningLimit--;
140
140
  if (responsiveWarningLimit === 0) {
141
141
  context.warnings.push(
142
- `[W560] responsive check: maximum issues reached, please fix reported ones and recheck`,
142
+ `[W5510] responsive check: maximum issues reached, please fix reported ones and recheck`,
143
143
  );
144
144
  }
145
145
  }
@@ -164,7 +164,7 @@ function chk_responsive(context, path, jsonConfig, component, opts) {
164
164
  if (missing.length) {
165
165
  handleResponsiveError(
166
166
  context,
167
- `[E557] missing size attributes [${missing.join(',')}] for ${component} at ${path}`,
167
+ `[E5507] missing size attributes [${missing.join(',')}] for ${component} at ${path}`,
168
168
  );
169
169
  }
170
170
  }
@@ -173,7 +173,7 @@ function chk_responsive(context, path, jsonConfig, component, opts) {
173
173
  if (jsonConfig[size] !== undefined && (jsonConfig[size] > 12 || jsonConfig[size] <= 0)) {
174
174
  handleResponsiveError(
175
175
  context,
176
- `[E561] invalid size attributes "${size}":"${jsonConfig[size]}" for ${component} at ${path}. Value must be 1 to 12.`,
176
+ `[E5511] invalid size attributes "${size}":"${jsonConfig[size]}" for ${component} at ${path}. Value must be 1 to 12.`,
177
177
  );
178
178
  }
179
179
  }
@@ -181,7 +181,7 @@ function chk_responsive(context, path, jsonConfig, component, opts) {
181
181
  if (!opts.sizesOptional && jsonConfig.xs && jsonConfig.xs != 12) {
182
182
  handleResponsiveWarning(
183
183
  context,
184
- `[W558] attribute "xs" for ${component} should specify a value of "12" at ${path}`,
184
+ `[W5508] attribute "xs" for ${component} should specify a value of "12" at ${path}`,
185
185
  );
186
186
  }
187
187
 
@@ -192,7 +192,7 @@ function chk_responsive(context, path, jsonConfig, component, opts) {
192
192
  if (jsonConfig.sm && jsonConfig.sm > ii) {
193
193
  handleResponsiveError(
194
194
  context,
195
- `[E559] "sm" value (${jsonConfig.sm}) for ${component} greater then value for smaller displays`,
195
+ `[E5509] "sm" value (${jsonConfig.sm}) for ${component} greater then value for smaller displays`,
196
196
  );
197
197
  } else {
198
198
  ii = jsonConfig.sm;
@@ -200,7 +200,7 @@ function chk_responsive(context, path, jsonConfig, component, opts) {
200
200
  if (jsonConfig.md && jsonConfig.md > ii) {
201
201
  handleResponsiveError(
202
202
  context,
203
- `[E559] "md" value (${jsonConfig.md}) for ${component} greater then value for smaller displays`,
203
+ `[E5509] "md" value (${jsonConfig.md}) for ${component} greater then value for smaller displays`,
204
204
  );
205
205
  } else {
206
206
  ii = jsonConfig.md;
@@ -208,7 +208,7 @@ function chk_responsive(context, path, jsonConfig, component, opts) {
208
208
  if (jsonConfig.lg && jsonConfig.lg > ii) {
209
209
  handleResponsiveError(
210
210
  context,
211
- `[E559] "lg" value (${jsonConfig.lg}) for ${component} greater then value for smaller displays`,
211
+ `[E5509] "lg" value (${jsonConfig.lg}) for ${component} greater then value for smaller displays`,
212
212
  );
213
213
  } else {
214
214
  ii = jsonConfig.lg;
@@ -216,7 +216,7 @@ function chk_responsive(context, path, jsonConfig, component, opts) {
216
216
  if (jsonConfig.xl && jsonConfig.xl > ii) {
217
217
  handleResponsiveError(
218
218
  context,
219
- `[E559] "xl" value (${jsonConfig.xl}) for ${component} greater then value for smaller displays`,
219
+ `[E5509] "xl" value (${jsonConfig.xl}) for ${component} greater then value for smaller displays`,
220
220
  );
221
221
  }
222
222
  }
@@ -481,12 +481,12 @@ function checkComponent(context, path, jsonConfig) {
481
481
 
482
482
  const type = jsonConfig.type;
483
483
  if (!type) {
484
- context.errors.push(`[E552] no type specified at ${path}`);
484
+ context.errors.push(`[E5502] no type specified at ${path}`);
485
485
  }
486
486
  common.debug(` type ${type}`);
487
487
 
488
488
  if (validComponents[type] === undefined) {
489
- context.errors.push(`[E554] unexpected component "${type}" detected at ${path}`);
489
+ context.errors.push(`[E5504] unexpected component "${type}" detected at ${path}`);
490
490
  } else if (typeof validComponents[type] === 'function') {
491
491
  validComponents[type](context, path, jsonConfig, false);
492
492
  } else {
@@ -510,7 +510,7 @@ function checkPanel(context, path, jsonConfig, isRoot) {
510
510
  common.debug(` scanning ${key}`);
511
511
 
512
512
  if (!validAttributes.includes(key)) {
513
- context.errors.push(`[E553] unexpected type "${key}" detected at ${path}`);
513
+ context.errors.push(`[E5503] unexpected type "${key}" detected at ${path}`);
514
514
  }
515
515
 
516
516
  if (key === 'type') {
@@ -525,7 +525,7 @@ function checkPanel(context, path, jsonConfig, isRoot) {
525
525
  const type = jsonConfig['items'][subkey].type;
526
526
  common.debug(` item ${subkey} / ${type}`);
527
527
  if (!type) {
528
- context.errors.push(`[E552] no type specified at ${path}`);
528
+ context.errors.push(`[E5502] no type specified at ${path}`);
529
529
  }
530
530
 
531
531
  if (type === 'panel') {
@@ -561,10 +561,10 @@ function checkTabs(context, path, jsonConfig) {
561
561
  const type = jsonConfig[key].type;
562
562
  common.debug(` item ${key} / ${type}`);
563
563
  if (!type) {
564
- context.errors.push(`[E552] no type specified at ${path}; expected "panel"`);
564
+ context.errors.push(`[E5502] no type specified at ${path}; expected "panel"`);
565
565
  }
566
566
  if (type !== 'panel') {
567
- context.errors.push(`[E553] unexpected type "${key}" detected at ${path}; expected "panel"`);
567
+ context.errors.push(`[E5503] unexpected type "${key}" detected at ${path}; expected "panel"`);
568
568
  } else {
569
569
  checkPanel(context, `${path}/${key}`, jsonConfig[key]);
570
570
  }
@@ -590,7 +590,7 @@ function checkJsonConfig(context, path, jsonConfig) {
590
590
  baseType = jsonConfig['type'];
591
591
  common.debug(` base type ${baseType}`);
592
592
  if (!validTypes.includes(baseType)) {
593
- context.errors.push(`[E550] unexpected base type "!${baseType}" detected at ${path}`);
593
+ context.errors.push(`[E5500] unexpected base type "!${baseType}" detected at ${path}`);
594
594
  }
595
595
  }
596
596
 
@@ -606,7 +606,7 @@ function checkJsonConfig(context, path, jsonConfig) {
606
606
  common.debug(``);
607
607
  common.debug(`scanning base attribute ${key}`);
608
608
  if (!validAttributes.includes(key)) {
609
- context.errors.push(`[E551] unexpected attribute "${key}" detected at ${path}`);
609
+ context.errors.push(`[E5501] unexpected attribute "${key}" detected at ${path}`);
610
610
  }
611
611
  if (key === 'items') {
612
612
  if (baseType == 'panel') {
@@ -625,15 +625,15 @@ exports.checkJsonConfig = checkJsonConfig;
625
625
  // List of error and warnings used at this module
626
626
  // ----------------------------------------------
627
627
 
628
- // [550] unexpected base type "!${baseType}" detected at ${path}
629
- // [551] unexpected attribute "${key}" detected at ${path}
630
- // [552] no type specified at ${path}
631
- // [553] unexpected type "${key}" detected at ${path}
632
- // [554] unexpected component "${type}" detected at ${path}
633
- // [555]
634
- // [556]
635
- // [557] responsive check: missing size attributes [${missing.join(',')}] at ${path}
636
- // [558] responsive check: attribute "xs" should specify a value of "12" at ${path}
637
- // [559] responsive check: "sm" value (${jsonConfig.sm}) greater then value for smaller displays
638
- // [560] responsive check: maximum issues reached, please fix reported ones and recheck
639
- // [561] invalid size attributes "${size}":"${jsonConfig[size]}" for ${component} at ${path}. Value must be 1 to 12.
628
+ // [5500] unexpected base type "!${baseType}" detected at ${path}
629
+ // [5501] unexpected attribute "${key}" detected at ${path}
630
+ // [5502] no type specified at ${path}
631
+ // [5503] unexpected type "${key}" detected at ${path}
632
+ // [5504] unexpected component "${type}" detected at ${path}
633
+ // [5505]
634
+ // [5506]
635
+ // [5507] responsive check: missing size attributes [${missing.join(',')}] at ${path}
636
+ // [5508] responsive check: attribute "xs" should specify a value of "12" at ${path}
637
+ // [5509] responsive check: "sm" value (${jsonConfig.sm}) greater then value for smaller displays
638
+ // [5510] responsive check: maximum issues reached, please fix reported ones and recheck
639
+ // [5511] invalid size attributes "${size}":"${jsonConfig[size]}" for ${component} at ${path}. Value must be 1 to 12.