agda / fix-whitespace Goto Github PK
View Code? Open in Web Editor NEWFixes whitespace issues
Home Page: https://hackage.haskell.org/package/fix-whitespace
License: Other
Fixes whitespace issues
Home Page: https://hackage.haskell.org/package/fix-whitespace
License: Other
After PR #44, performance has degraded for large files with lots of violations.
Reproducer:
runhaskell test/GenerateViolations.hs 200000
FW=$(cabal list-bin fix-whitespace)
time $FW --check 200000-violations.txt 2> /dev/null
Takes 30sec on my machine. The released (0.0.11) finishes in a fraction of a second.
Proposed procedure:
--verbose
flag.Files that are not readable should be skipped (and included in the report), rather than making fix-whitespace
crash, as in the case of:
hGetContents: invalid argument (invalid byte sequence)
Can someone make the release? If someone add me as maintainer in Hackage (user AndresSicardRamirez
) I could make the release.
Add --version
option to print the program version.
Please add issues with GHC 9.2 compilation to this list:
Even after running cabal update
, I keep getting an error telling me that
filepattern
is an unknown package.
[__1] unknown package: filepattern (dependency of fix-whitespace)
What the title says.
Fix tabs that lurk around, also in empty lines, too.
I'm getting the following warning:
$ stack install --stack-yaml=stack-8.10.1.yaml --system-ghc
...
Warning: Failed to decode module interface:
/home/asr/src/fix-whitespace/.stack-work/dist/x86_64-linux/Cabal-3.2.0.0/build/fix-whitespace/fix-whitespace-tmp/ParseConfig.hi Decoding
failure: Invalid magic: e49ceb0f
You can see also the warning in Travis.
It seems the warning is related to commercialhaskell/stack#5134.
I'd like to use fix-whitespace
in other projects. Thanks to your work, it is no longer tied to Agda.
Let's release it on hackage!
Here is a candidate: https://hackage.haskell.org/package/fix-whitespace-0.0.5/candidate
Add a golden value testsuite.
Since there is now printing of error locations, we should test for correct outputs:
Use case:
git ls-tree -r master --name-only | xargs fix-whitespace --config fix-whitespace.yaml
or simply
git ls-tree -r master --name-only | xargs fix-whitespace
This should filter the FILES given to fix-whitespace
through the configuration given in fix-whitespace.yaml
.
A new flag, like --config -
could be used if really all of the given FILES should be processed.
--check
should be the default, option --fix
should fix the whitespace issues in files.
This is the safer UI.
What the title says.
One can now use the gh
tool to create a release:
gh release create v0.1 [FILE] --generate-notes
gh release upload v0.1 FILE --clobber
Blocked on:
GHC 9.0.1 was released.
Known issues (2021-02-17)
As title.
Turn existing instances of fix-whitespace CI workflows into a github action.
Consider making binary releases for the github action platforms to speed up the action (no need to install GHC, Cabal, build fix-whitespace...).
With these additional files in test/interaction
,
/test/interaction$ tree issue-4828-NEve/
issue-4828-NEve/
├── src
│ └── Issue4828.agda
└── sym
└── Issue4828.agda -> issue-4828-NEve/src/Issue4828.agda
I get this error:
$ fix-whitespace --check
fix-whitespace: .../test/interaction/issue-4828-NEve/sym/Issue4828.agda/: getDirectoryContents:openDirStream: does not exist (No such file or directory)
Seems like a symlink is treated as a directory somehow.
UPDATE: Blocked upstream:
Lifted from #44 (comment).
The following violation type does not produce an error:
Line 21 in eb7062c
Reason: After breaking the file into lines, we cannot observe anymore whether the last line ended in a newline character. So maybe we have to implement our own line-breaking function which gives an error if the last line does not end with newline.
It would be nice if fix-whitespace
would tell (a) what kind of error it discover, and more importantly, (b) where in the file it is. That would be particularly helpful for large non-trivial files.
Some files have tabs as part of the syntax, like Makefile
.
I propose to put the tab-expansion under a flag --tab
, which could have a number argument TABSIZE
that defaults to 8.
This is a breaking change, so, new major version: 0.1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.