argoproj / argoproj/argo-workflows

File name at linter output if run against the directory

Open
#10,539 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

# Summary

Provide the file name when do lint against directory if there many files to be passed via linter

# Use Cases

It would be good also having better output message if checking the dozens of files in one directory, for example by this command:`argo lint ./` (lint all in current dir), but the output is like:
```
ERRO[current_date_time_stamp] yaml file at index 0 is not valid: error converting YAML to JSON: yaml: line 28: could not find expected ':'
✔ no linting errors found!
```
so basically no error but the error shown here is not clear which file is affected from:
```
ls -la | wc -l
25
```
24 files in fact (including line `total`)
which one in fact is affected? I use `loglevel` flag, it still doesn't uncover it (doesn't matter on level):
```
argo lint ./ --loglevel error
ERRO[current_date_time_stamp] yaml file at index 0 is not valid: error converting YAML to JSON: yaml: line 28: could not find expected ':'
✔ no linting errors found!
```
could it be like:
```
ERRO[current_date_time_stamp] [] yaml file at index 0 is not valid: error converting YAML to JSON: yaml: line 28: could not find expected ':'
```
or
```
ERRO[current_date_time_stamp] yaml file at index 0 is not valid: error converting YAML to JSON: yaml: line 28: could not find expected ':'
```
Thank you!
---

**Message from the maintainers**:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

Contributor guide

Open the contributing guide

Research direction

Start with the `argo lint ./` entry point and reproduce the YAML parse error across multiple files, then compare its output with `--loglevel error`. Done means the lint error identifies the affected file while preserving the useful YAML error details and avoiding a misleading success message.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.