fix regexps #2

Open
opened 2022-08-01 08:39:33 +00:00 by zzkt · 2 comments
zzkt commented 2022-08-01 08:39:33 +00:00 (Migrated from github.com)

via the eldev regexp linter

 eldev -p -dtT -q lint re *.el

in sclang-language.el

sclang-language.el:63:9: In sclang-method-name-special-chars: Repetition of repetition (pos 5)
  "-!%&*+/<=>?@|"
   .....^
sclang-language.el:71:3: In sclang-method-name-special-regexp: Duplicated ‘\’ inside character alternative (pos 7)
  "[-!%&\\*\\+/<=>\\?@|]+"
   ........^
sclang-language.el:71:3: In sclang-method-name-special-regexp: Duplicated ‘\’ inside character alternative (pos 13)
  "[-!%&\\*\\+/<=>\\?@|]+"
   ...............^
sclang-language.el:72:8: Value from ‘regexp-quote’ cannot be spliced into ‘[...]’
sclang-language.el:76:3: In sclang-method-name-regexp: Duplicated ‘\’ inside character alternative (pos 11)
  "\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)"
   .............^
sclang-language.el:76:3: In sclang-method-name-regexp: Duplicated ‘\’ inside character alternative (pos 17)
  "\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)"
   ....................^
sclang-language.el:90:3: In sclang-symbol-name-regexp: Duplicated ‘\’ inside character alternative (pos 15)
  "\\(?:\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\|\\(?:\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)"
   ..................^
sclang-language.el:90:3: In sclang-symbol-name-regexp: Duplicated ‘\’ inside character alternative (pos 21)
  "\\(?:\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\|\\(?:\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)"
   .........................^
sclang-language.el:104:3: In sclang-method-definition-regexp: Duplicated ‘\’ inside character alternative (pos 21)
  "^\\s *\\*?\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\s *{"
   ..........................^
sclang-language.el:104:3: In sclang-method-definition-regexp: Duplicated ‘\’ inside character alternative (pos 27)
  "^\\s *\\*?\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\s *{"
   .................................^
sclang-language.el:108:29: In sclang-block-regexp: Repetition subsumes preceding repetition (pos 21)
  "^\\((\\)\\s *\\(?:/[/*]?.*\\)?"
   .........................^
sclang-language.el:115:3: In sclang-beginning-of-defun-regexp: Repetition subsumes preceding repetition (pos 143)
  "\\(?:^\\s *\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)\\(?:\\s *:\\s *\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)\\)?[[:space:]]*{\\)\\|\\(?:^\\((\\)\\s *\\(?:/[/*]?.*\\)?\\)"
   ................................................................................................................................................................................^
sclang-language.el:125:3: In sclang-method-definition-spec-regexp: Duplicated ‘\’ inside character alternative (pos 52)
  "\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)-\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)"
   .................................................................^
sclang-language.el:125:3: In sclang-method-definition-spec-regexp: Duplicated ‘\’ inside character alternative (pos 58)
  "\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)-\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)"
   ........................................................................^
sclang-language.el:653:39: In call to re-search-backward: Duplicated ‘\’ inside character alternative (pos 65)
  "\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*[ \t\n]*\\(?:\\.[ \t\n]*\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\)?[ \t\n]*("
   ..................................................................................^
sclang-language.el:653:39: In call to re-search-backward: Duplicated ‘\’ inside character alternative (pos 71)
  "\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*[ \t\n]*\\(?:\\.[ \t\n]*\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\)?[ \t\n]*("
   .........................................................................................^
Found 16 warnings in file ‘sclang-language.el’
via the eldev regexp linter ``` eldev -p -dtT -q lint re *.el ``` in `sclang-language.el` ``` sclang-language.el:63:9: In sclang-method-name-special-chars: Repetition of repetition (pos 5) "-!%&*+/<=>?@|" .....^ sclang-language.el:71:3: In sclang-method-name-special-regexp: Duplicated ‘\’ inside character alternative (pos 7) "[-!%&\\*\\+/<=>\\?@|]+" ........^ sclang-language.el:71:3: In sclang-method-name-special-regexp: Duplicated ‘\’ inside character alternative (pos 13) "[-!%&\\*\\+/<=>\\?@|]+" ...............^ sclang-language.el:72:8: Value from ‘regexp-quote’ cannot be spliced into ‘[...]’ sclang-language.el:76:3: In sclang-method-name-regexp: Duplicated ‘\’ inside character alternative (pos 11) "\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)" .............^ sclang-language.el:76:3: In sclang-method-name-regexp: Duplicated ‘\’ inside character alternative (pos 17) "\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)" ....................^ sclang-language.el:90:3: In sclang-symbol-name-regexp: Duplicated ‘\’ inside character alternative (pos 15) "\\(?:\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\|\\(?:\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)" ..................^ sclang-language.el:90:3: In sclang-symbol-name-regexp: Duplicated ‘\’ inside character alternative (pos 21) "\\(?:\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\|\\(?:\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)" .........................^ sclang-language.el:104:3: In sclang-method-definition-regexp: Duplicated ‘\’ inside character alternative (pos 21) "^\\s *\\*?\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\s *{" ..........................^ sclang-language.el:104:3: In sclang-method-definition-regexp: Duplicated ‘\’ inside character alternative (pos 27) "^\\s *\\*?\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\s *{" .................................^ sclang-language.el:108:29: In sclang-block-regexp: Repetition subsumes preceding repetition (pos 21) "^\\((\\)\\s *\\(?:/[/*]?.*\\)?" .........................^ sclang-language.el:115:3: In sclang-beginning-of-defun-regexp: Repetition subsumes preceding repetition (pos 143) "\\(?:^\\s *\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)\\(?:\\s *:\\s *\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)\\)?[[:space:]]*{\\)\\|\\(?:^\\((\\)\\s *\\(?:/[/*]?.*\\)?\\)" ................................................................................................................................................................................^ sclang-language.el:125:3: In sclang-method-definition-spec-regexp: Duplicated ‘\’ inside character alternative (pos 52) "\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)-\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)" .................................................................^ sclang-language.el:125:3: In sclang-method-definition-spec-regexp: Duplicated ‘\’ inside character alternative (pos 58) "\\(\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*\\)-\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)" ........................................................................^ sclang-language.el:653:39: In call to re-search-backward: Duplicated ‘\’ inside character alternative (pos 65) "\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*[ \t\n]*\\(?:\\.[ \t\n]*\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\)?[ \t\n]*(" ..................................................................................^ sclang-language.el:653:39: In call to re-search-backward: Duplicated ‘\’ inside character alternative (pos 71) "\\<\\(?:Meta_\\)?[A-Z]\\(?:\\sw\\|\\s_\\)*[ \t\n]*\\(?:\\.[ \t\n]*\\(\\(?:[-!%&\\*\\+/<=>\\?@|]+\\)\\|\\(?:[a-zA-Z]\\(?:\\sw\\|\\s_\\)*_?\\)\\)\\)?[ \t\n]*(" .........................................................................................^ Found 16 warnings in file ‘sclang-language.el’ ```
zzkt commented 2022-08-01 08:41:38 +00:00 (Migrated from github.com)

etc

etc
zzkt commented 2022-08-02 11:38:56 +00:00 (Migrated from github.com)

fixed in sclang-interp.el

sclang-interp.el:47:54: Ineffective string escape ‘\+’
sclang-interp.el:47:81: Ineffective string escape ‘\+’
sclang-interp.el:47:100: Ineffective string escape ‘\+’
Found 3 warnings in file ‘sclang-interp.el’
fixed in `sclang-interp.el` ``` sclang-interp.el:47:54: Ineffective string escape ‘\+’ sclang-interp.el:47:81: Ineffective string escape ‘\+’ sclang-interp.el:47:100: Ineffective string escape ‘\+’ Found 3 warnings in file ‘sclang-interp.el’ ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: zzkt/scel#2
No description provided.