Comments (6)
@cedric-spinergie it will be added soon. For now, the pre-commit hook can be modified to not fail on exit code 14
I'm thinking --allow-no-files
similary to git's --allow-empty
from dprint.
dprint will return the 14
exit code specifically for this purpose: https://dprint.dev/cli/#exit-codes
I believe that could be used here instead of adding a flag?
from dprint.
That is helpful as it's more exact than a substring match of the logs - though we would still need to catch the crash, check for the exit code, and pass on the crash in all other cases.
In an ideal scenario dprint would be able to exit 0 here.
from dprint.
Hello, we have the same issue: if a commit doesn't contain a modification to a file included by dprint
, we get the error code 14
which blocks our pre-commit hook from passing even though everything went fine.
We would like to be able to disable this behavior with a cli flag.
from dprint.
Thank you!
One workaround I put in place is to mirror the excludes I configured in dprint.json
inside my pre-commit config.
Meaning it won't even try to run dprint
if there are no files for it to format.
Just telling about this in case it can help someone else in the meantime.
from dprint.
This is now available in 0.43.0
from dprint.
Related Issues (20)
- Document using lsp in various editors
- Can't remove BOM HOT 1
- CI GH Actions compile error HOT 5
- Possible to have `dprint` `biome` point to `biome.json` for configuration? HOT 3
- Can't Format Files In Hardlink Folder
- Support assigning a file to a formatter based on its shebang HOT 5
- Include / exclude behavior differs with `--stdin` HOT 1
- JSON config schema file HOT 1
- Offline process plugin installation instructions
- Config - Ability to include subset of another arbitrary JSON file
- Programatic API for TS (Node/Bun/Deno/etc.) HOT 2
- CLI fails to run on android-arm64
- dprint hangs sometimes HOT 3
- Memory leak in dprint-core HOT 1
- dprint attempts to format files in .git HOT 1
- plugin-prettier causes `dprint fmt` to crash on Apple M3 HOT 2
- Support for key spacing alignment HOT 2
- npm package's post-install should copy binary to node_modules/.bin folder?
- Delegate to repository-local dprint when available
- `associations` do not overwrite file extensions supported by the plugin.
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 dprint.