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

Linter hangs indefinitely if configuration file is not present #50

Closed
Awkor opened this issue Feb 4, 2020 · 1 comment
Closed

Linter hangs indefinitely if configuration file is not present #50

Awkor opened this issue Feb 4, 2020 · 1 comment
Assignees
Labels
bug Something isn't working linter

Comments

@Awkor
Copy link

Awkor commented Feb 4, 2020

Here's the output after stopping the linter with Ctrl+c:

E:\>gdlint Grid.gd
Traceback (most recent call last):
  File "c:\program files (x86)\python37-32\lib\genericpath.py", line 30, in isfile
    st = os.stat(path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'E:\\gdlintrc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\Scripts\gdlint-script.py", line 11, in <module>
    load_entry_point('gdtoolkit==3.2.2', 'console_scripts', 'gdlint')()
  File "c:\program files (x86)\python37-32\lib\site-packages\gdtoolkit\linter\__main__.py", line 56, in main
    if os.path.isfile(file_path):
  File "c:\program files (x86)\python37-32\lib\genericpath.py", line 30, in isfile
    st = os.stat(path)
KeyboardInterrupt

This doesn't happen if there's a configuration file in directory where gdlint is executed.

Here's the same output as above plus the configuration file generation:

E:\>gdlint Grid.gd
Traceback (most recent call last):
  File "c:\program files (x86)\python37-32\lib\genericpath.py", line 30, in isfile
    st = os.stat(path)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'E:\\gdlintrc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\Scripts\gdlint-script.py", line 11, in <module>
    load_entry_point('gdtoolkit==3.2.2', 'console_scripts', 'gdlint')()
  File "c:\program files (x86)\python37-32\lib\site-packages\gdtoolkit\linter\__main__.py", line 56, in main
    if os.path.isfile(file_path):
  File "c:\program files (x86)\python37-32\lib\genericpath.py", line 30, in isfile
    st = os.stat(path)
KeyboardInterrupt

E:\>gdlint -d

E:\>gdlint Grid.gd
Grid.gd:2: Error: Definition out of order in global scope (class-definitions-order)
Grid.gd:14: Error: Definition out of order in global scope (class-definitions-order)
Grid.gd:17: Error: Definition out of order in global scope (class-definitions-order)
Grid.gd:18: Error: Definition out of order in global scope (class-definitions-order)
Grid.gd:31: Error: unused function argument 'delta' (unused-argument)

E:\>
@Scony Scony added bug Something isn't working linter labels Feb 4, 2020
@Scony
Copy link
Owner

Scony commented Feb 4, 2020

Yeah while search_dir != Path("/"): is working on Linux only... I'll change to platform-independent while search_dir != Path(os.path.abspath(os.sep)): and it should be fine. Will release soon, thanks!

@Scony Scony self-assigned this Feb 4, 2020
@Scony Scony closed this as completed in 128b1c8 Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linter
Projects
None yet
Development

No branches or pull requests

2 participants