Comments (7)
Another check in the same repo (eslint: true) passes successfully, so it's not a permission issue. It's only an issue for prettier: true check
Create check runs with commit annotations
Creating GitHub check with success conclusion and 0 annotations for ESLint…
ESLint check created successfully
from lint-action.
How can I get the payload for the HTTP post to debug?
from lint-action.
I managed to extract the payload that was causing the 422 error. The issue is "path" is a required field, but not included.
{
"name":"Prettier",
"head_sha":"8926cd754ef3fc50cf4f605b55fa686f4da2630c",
"conclusion":"failure",
"output":{
"title":"1 error",
"summary":"Prettier found 1 error",
"annotations":[
{
"path":"",
"start_line":1,
"end_line":1,
"annotation_level":"failure",
"message":"There are issues with this file's formatting, please run Prettier to fix the errors"
}
]
}
}
from lint-action.
I've tracked the issue to prettier itself; prettier/prettier#13516
I think this module could respond a bit better to prettier erroring. In linters/prettier.js we have this code.
const paths = output.stdout.split(/\r?\n/);
lintResult.error = paths.map((path) => ({
path,
firstLine: 1,
lastLine: 1,
message:
"There are issues with this file's formatting, please run Prettier to fix the errors",
}));
However in this case, output.stdout is blank (hence path being an empty string), with the error being in output.stderr.
from lint-action.
Updating prettier in my project seemed to solve the issue. I'll close this, sorry for the noise!
from lint-action.
I've suggested a minor improvement at #722 to prevent invalid checks being pushed.
from lint-action.
Checking output.stderror this is that value. Should I bother to parse this?
[error] src/components/Icon/Icon.stories.tsx: SyntaxError: ',' expected. (32:3)
[error] 30 | },
[error] 31 | },
[error] > 32 | } satisfies Meta<typeof Icon>
[error] | ^
[error] 33 |
[error] 34 | export default meta
[error] 35 | type Story = StoryObj<typeof Icon>
I could regexp the first line and extract path, error, line, character?
from lint-action.
Related Issues (20)
- Fails to create checkrun HOT 1
- Linters showing up under wrong workflow name HOT 1
- node12 is deprecated and will be forced to run on node16 error in github actions
- Rust linters both clippy and rustfmt are not recognized HOT 3
- Error when running on merge queue HOT 1
- Add support for mh_style HOT 1
- rubocop issue HOT 1
- Add support for Rome HOT 1
- Add support for `pnpm` and custom commands HOT 3
- Action fails for "merge_group" events HOT 2
- ESLint with Flat Config breaks because of --ext parameter HOT 3
- TSC linter fails when no errors HOT 2
- ESlint config changes will change --ext usage HOT 3
- Checks annotation limit HOT 4
- ESlint config changes will change --ext usage
- lint only changed files HOT 1
- `clippy` and `rustfmt` are not _really_ supported HOT 7
- Clang_format only shows "code should be clang-formatted [-Wclang-format-violations]" HOT 1
- Add support for staticchecker HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lint-action.