Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow regal lint - to lint from stdin #1122

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Allow regal lint - to lint from stdin #1122

merged 1 commit into from
Sep 20, 2024

Conversation

anderseknert
Copy link
Member

And print notices for rules ignored as a result of no filename being known.

➜ cat lab/p.rego | go run main.go lint -
1 file linted. No violations found. 2 rules skipped:
- directory-package-mismatch: disabled when filename is unknown
- file-missing-test-suffix: disabled when filename is unknown

Fixes #1118

And print notices for rules ignored as a result of no filename being known.

```
➜ cat lab/p.rego | go run main.go lint -
1 file linted. No violations found. 2 rules skipped:
- directory-package-mismatch: disabled when filename is unknown
- file-missing-test-suffix: disabled when filename is unknown
```

Fixes #1118

Signed-off-by: Anders Eknert <anders@styra.com>
Copy link
Member

@srenatus srenatus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, I'll try it later today

@anderseknert anderseknert merged commit 838c6fa into main Sep 20, 2024
4 checks passed
@anderseknert anderseknert deleted the lint-stdin branch September 20, 2024 05:52
@anderseknert
Copy link
Member Author

Let me know if you find anything to improve!

@srenatus
Copy link
Member

Works beautifully ✨ thanks again!

srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
And print notices for rules ignored as a result of no filename being known.

```
➜ cat lab/p.rego | go run main.go lint -
1 file linted. No violations found. 2 rules skipped:
- directory-package-mismatch: disabled when filename is unknown
- file-missing-test-suffix: disabled when filename is unknown
```

Fixes StyraInc#1118

Signed-off-by: Anders Eknert <anders@styra.com>
charlieegan3 pushed a commit to charlieegan3/regal that referenced this pull request Jan 6, 2025
And print notices for rules ignored as a result of no filename being known.

```
➜ cat lab/p.rego | go run main.go lint -
1 file linted. No violations found. 2 rules skipped:
- directory-package-mismatch: disabled when filename is unknown
- file-missing-test-suffix: disabled when filename is unknown
```

Fixes StyraInc#1118

Signed-off-by: Anders Eknert <anders@styra.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: lint stdin
2 participants