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

panic: runtime error: invalid memory address or nil pointer dereference #29

Closed
amritpurshotam opened this issue Aug 11, 2021 · 2 comments

Comments

@amritpurshotam
Copy link

System Information

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19043 N/A Build 19043
Python 3.7.5
mllint version: 0.12.0
commit: 400f497aaf361481c6a650464767c52afecd7081
date: 2021-08-04T20:54:27Z
took: 8.7563ms

Steps to Reproduce

I run mllint src (src is my source code directory) and get the following error

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0x6b28a6]

The full output is below

Linting project at  C:\Development\computer-vision-papers/src
No .mllint.yml or pyproject.toml found in project folder, using default configuration
---

✔️ Done - Custom Rules (0.00 ms)
⏳ Waiting - Version Control (0.00 ms)
✔️ Done - Dependency Management (0.56 ms)
🏃 Running - Continuous Integration (CI) (0.00 ms)
🏃 Running - Code Quality (0.00 ms)
✔️ Done - Testing (0.56 ms)
Analysing project... (4/8)

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0x6b28a6]

goroutine 72 [running]:
github.com/bvobart/mllint/utils.FileExists(0xc0015812c0, 0x50, 0x2)
        /home/runner/work/mllint/mllint/utils/files.go:18 +0xa6
github.com/bvobart/mllint/setools/ciproviders.Azure.Detect(0xc000fc9050, 0x29, 0x40)
        /home/runner/work/mllint/mllint/setools/ciproviders/azure.go:19 +0xb3
github.com/bvobart/mllint/setools/ciproviders.Detect(0xc000fc9050, 0x29, 0x1afe3c0, 0xc0002da708, 0xb41648)
        /home/runner/work/mllint/mllint/setools/ciproviders/providers.go:37 +0xc9
github.com/bvobart/mllint/linters/ci.(*CILinter).LintProject(0x1b57af0, 0xc000fc9050, 0x29, 0xc000a3e440, 0x3c, 0xc0000e9f80, 0x28, 0xc0000acba0, 0xb, 0x1, ...)
        /home/runner/work/mllint/mllint/linters/ci/linter.go:27 +0xaf
github.com/bvobart/mllint/commands/mllint.(*MLLintRunner).runTask.func1(0xc000504d80, 0xc000a30480)
        /home/runner/work/mllint/mllint/commands/mllint/queueworker.go:89 +0xdf
created by github.com/bvobart/mllint/commands/mllint.(*MLLintRunner).runTask
        /home/runner/work/mllint/mllint/commands/mllint/queueworker.go:83 +0x74
@amritpurshotam
Copy link
Author

amritpurshotam commented Aug 11, 2021

Nevermind realised it's meant to be on the full project and not just code 😅

@bvobart
Copy link
Owner

bvobart commented Aug 12, 2021

Indeed, mllint is meant to be run on the project's root directory instead of the src directory. Nevertheless, that panic shouldn't happen. I'll look into it, should be a simple fix.

@bvobart bvobart reopened this Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants