[js-formatter] Adding .jsignore file to completely ignore modules for processing
authorJavier Armendáriz <javier.armendariz@openbravo.com>
Mon, 03 Jun 2019 10:07:24 +0200
changeset 36125 c1a629579027
parent 36124 faae3d418dcf
child 36126 c8ad52cae2d4
[js-formatter] Adding .jsignore file to completely ignore modules for processing
modules/org.openbravo.client.kernel/jsformatter/jsformatter
modules/org.openbravo.client.kernel/jslint/jslint
--- a/modules/org.openbravo.client.kernel/jsformatter/jsformatter	Fri May 31 11:43:28 2019 +0200
+++ b/modules/org.openbravo.client.kernel/jsformatter/jsformatter	Mon Jun 03 10:07:24 2019 +0200
@@ -50,7 +50,7 @@
 
 function getPrettierIgnorePatterns {
     PATTERNS=""
-    for mod in ${1} ; do
+    for mod in ${@} ; do
         PATTERNS="${PATTERNS} !"${mod}"/**"
     done
 
@@ -61,7 +61,8 @@
     if [[ -d ${SCAN_BASE_PATH}/../modules ]]; then
         echo "Formatter check for Core files"
         MODS_WITH_IGNORE=$(getModulesPathWithIgnoreFile ".prettierignore")
-        IGNORE_PATTERNS=$(getPrettierIgnorePatterns "${MODS_WITH_IGNORE}")
+        MODS_COMPLETELY_IGNORED=$(getModulesPathWithIgnoreFile ".jsignore")
+        IGNORE_PATTERNS=$(getPrettierIgnorePatterns "${MODS_WITH_IGNORE}" "${MODS_COMPLETELY_IGNORED}")
 
         runFormatterInCore "${IGNORE_PATTERNS}" "${FLAGS}"
         for mod in ${MODS_WITH_IGNORE} ; do
--- a/modules/org.openbravo.client.kernel/jslint/jslint	Fri May 31 11:43:28 2019 +0200
+++ b/modules/org.openbravo.client.kernel/jslint/jslint	Mon Jun 03 10:07:24 2019 +0200
@@ -48,7 +48,7 @@
 
 function getEslintIgnorePatterns {
     PATTERNS=""
-    for mod in ${1} ; do
+    for mod in ${@} ; do
         PATTERNS="${PATTERNS} --ignore-pattern $(basename ${mod})"
     done
 
@@ -59,7 +59,8 @@
     if [[ -d ${SCAN_BASE_PATH}/../modules ]]; then
         echo "Lint check for Core files"
         MODS_WITH_IGNORE=$(getModulesPathWithIgnoreFile ".eslintignore")
-        IGNORE_PATTERNS=$(getEslintIgnorePatterns "${MODS_WITH_IGNORE}")
+        MODS_COMPLETELY_IGNORED=$(getModulesPathWithIgnoreFile ".jsignore")
+        IGNORE_PATTERNS=$(getEslintIgnorePatterns "${MODS_WITH_IGNORE}" "${MODS_COMPLETELY_IGNORED}")
 
         runLinterInCore  ${SCAN_BASE_PATH} "${IGNORE_PATTERNS}" "${FLAGS}"
         for mod in ${MODS_WITH_IGNORE} ; do