googleapis / googleapis/api-linter

Support directory as input to linter

Open
#1,480 1 comment 0 reactions 0 assignees View on GitHub
priority: p3 type: feature request
Dominant language
Go
Stars
765
Forks
181
Avg merge
2d 12h
Merged PRs (30d)
3

Description

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

**Is your feature request related to a problem? Please describe.**
The linter receives one or more proto files as input for execution. In our setup, we group all our proto files under a directory tree. The development experience would be better if we could pass the root directory name and the linter finds all `proto` files under its tree.

```
proto/
- dir1/
- api1.proto
- api2.proto
- dir2/
- api3.proto
- root.proto
```

As of now, passing `proto/` as input to the linter, errors with:
```
2025/02/25 13:12:12 read proto: is a directory
```

**Describe the solution you'd like**
The linter walks through the file system, finds the proto files and executes the linting logic on all of them.

**Describe alternatives you've considered**
As of now we have to use a shell combination by piping the output of `find` into the linter executable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.