question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Runs on files and syntaxes it should not, ignores settings

See original GitHub issue

System info:

  • Sublime Text version: 3176
  • Which system are you on: ArchLinux x86_64, GCC 8.2.1
  • Clang version: 6.0.1

What happens:

EasyClangComplete seems to ignore the syntax definitions of files and tries to run/recognise the language in files that it should not. For example, instead of only running in C++ files, it runs on every click inside a *.py file, clearly labelled as Python syntax by SublimeText. Not only does this completely pollutes the logs, but also results in a significant performance hit.

ECC Error on Python

Settings:

{
    "common_flags" : [
        "-I/usr/include",
        "-I/usr/include/root",
        "-I$project_base_path/src",
        "-I$project_base_path/common/include",
        "-I/usr/lib/clang/$clang_version/include",
    ],

    "lang_flags": {
        "C": ["-std=c17"],
        "CPP": ["-std=c++17"],
        "OBJECTIVE_C": ["-std=c17"],
        "OBJECTIVE_CPP": ["-std=c++17"],
    },

    "verbose" : true
}
Log that illustrates the issue:
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[MainThread]: Cannot recognize language from syntax: 'Python'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Plain Text (Log)'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Plain Text (Log)'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Plain Text (Log)'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Plain Text (Log)'
[ECC:ERROR]:[tools.py]:[get_view_lang]:[Dummy-11]: Cannot recognize language from syntax: 'Plain Text (Log)'

full.log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
niosuscommented, Sep 24, 2018

Yeah, this might be not optimal for now. It is probably a good idea to store the valid syntax in some cache. I just need to figure out where it makes sense to put it and how to handle settings reload.

0reactions
kgizdovcommented, Sep 28, 2018

alright, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignoring files, folders, or code - Semgrep
This documents various methods to skip or ignore files, folders, or code that are not relevant to a Semgrep scan.
Read more >
Gitlab CI how to ignore directory using rules syntax?
Based on documents of rules: changes , it seems when: never must be used with rules: changes syntax. Like the following:
Read more >
.gitignore file - ignoring files in Git | Atlassian Git Tutorial
Git ignore patterns are used to exclude certain files in your working directory from your Git history. They can be local, global, or...
Read more >
Ignoring Code - Prettier
Use .prettierignore to ignore (i.e. not reformat) certain files and folders completely. Use “prettier-ignore” comments to ignore parts of files.
Read more >
Ignoring Code - ESLint - Pluggable JavaScript Linter
You can tell ESLint to ignore specific files and directories using ignorePatterns in your config files. ignorePatterns patterns follow the same rules as ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found