Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed regex in Lua.plist #19

Open
lildude opened this issue Mar 12, 2024 · 4 comments
Open

Malformed regex in Lua.plist #19

lildude opened this issue Mar 12, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lildude
Copy link

lildude commented Mar 12, 2024

👋 from github-linguist/linguist, the library GitHub.com uses for language detection, and also the repo that tells our syntax highlighter which grammars to use.

The Lua grammar was recently switched to using this repo in github-linguist/linguist#6661 and our grammar compiler has found some malformed regexes in the Lua.plist file. These aren't found in the lua.tmLanguage.json so this is likely to be an inconsistency between the two files:

- [ ] repository `vendor/grammars/lua.tmbundle` (from https://github.com/LuaLS/lua.tmbundle.git) (22 errors)
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@class`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@enum`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@type`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@alias`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)(@operator)\s*(\b[`...": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@cast`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@param`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@return`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@field`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@generic`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@vararg`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@overload`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@deprecated`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@meta`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@private`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@protected`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@package`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@version`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@see`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@diagnostic`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@module`": lookbehind assertion is not fixed length (at offset 13))
  - Invalid regex in grammar: `source.lua` (in `Syntaxes/Lua.plist`) contains a malformed regex (regex "`(?<=---[ \t]*)@(async|nodiscard)`": lookbehind assertion is not fixed length (at offset 13))

If it helps, our grammar highlighting engine uses PCRE for performance reasons.

@sumneko sumneko added the bug Something isn't working label Apr 25, 2024
@sumneko
Copy link
Collaborator

sumneko commented Apr 25, 2024

Thank you for providing such a tool. Is there a GitHub action available for me to use in my workflow?

@lildude
Copy link
Author

lildude commented Apr 25, 2024

Thank you for providing such a tool. Is there a GitHub action available for me to use in my workflow?

Unfortunately, no.

@sumneko
Copy link
Collaborator

sumneko commented Apr 25, 2024

Could you please check if it fixed by 5882e54 ?

@Sainan
Copy link

Sainan commented Apr 25, 2024

As he did say "These aren't found in the lua.tmLanguage.json", he is telling you to update your Lua.plist.

sumneko added a commit that referenced this issue Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants