Comments (8)
It looks as if you don't have any valid source or test pages in your project. So this code:
(->> (concat (:source-paths project)
(:test-paths project))
(map io/file)
(filter #(and (.exists %) (.isDirectory %))))
Is returning an empty seq. I can add in a better error message, but cljfmt is still going to throw an error message if it can't find any source or test paths.
What does your project.clj
file look like?
from cljfmt.
I think I figured out the problem. My project has multiple modules inside of it. I had my :source-paths
and :test-paths
listed under the nested {:modules {:inherited ..}}
section of my parent project.clj
file.
So when I ran lein cljfmt check
from these individual modules(each having their own project.clj
with :source-paths
and :test-paths
), it worked as expected.
I think this issue can be closed. But I agree, a more useful error message would be helpful here as you mentioned.
from cljfmt.
I'll keep the issue open until I put in a better error message. Missing source paths shouldn't result in a stack overflow :)
from cljfmt.
cljfmt is still going to throw an error message if it can't find any source or test paths.
Why can't it just default to CWD?
from cljfmt.
When I have trouble I typically go to the project's configuration to see how it's done. Neither project.clj
in this repository seem to have :source-paths
, so how exactly are they supposed to be configured? Do you not run your own project against your own code?
from cljfmt.
Why can't it just default to CWD?
If the project configuration is broken, then the best option is to raise an error, not try to work around it.
from cljfmt.
When I have trouble I typically go to the project's configuration to see how it's done. Neither
project.clj
in this repository seem to have:source-paths
, so how exactly are they supposed to be configured? Do you not run your own project against your own code?
Leiningen has a default :source-paths
of ["src"]
.
from cljfmt.
Thanks. I have moved my code into src
.
I'm a few chapters into Clojure Programming and needed to jump into building something, anything, so I just started a folder and began solving problems on https://projecteuler.net/. Thanks for the help :)
from cljfmt.
Related Issues (20)
- :paths config from .cljfmt.edn is ignored by `cljfmt.main/-main` HOT 2
- fix returns empty STDOUT when successful HOT 2
- Format clojure file with shebang HOT 6
- Exception when using 0.10.x series as a Leiningen plugin HOT 3
- lein-cljfmt is broken
- Custom Output Pattern HOT 2
- Incorrect cljfmt.config/load-config defaults merge HOT 5
- latest 0.11.0 linux static binary is broken HOT 4
- Options don't merge correctly (version 11) HOT 5
- Change 11 to be non breaking HOT 13
- Format if to one line or 3 HOT 1
- `reformat-string` doesn't honor `:legacy/merge-indents? true` HOT 8
- Add node.js support to `cljfmt.config`
- Homebrew HOT 8
- Make one space list indentation configurable
- Add option to exclude (comment) blocks from formatting HOT 3
- Un-nest namespace functionality HOT 1
- Support multiple config.edn files HOT 3
- Consider adding support for pre-commit
- Identation off for protocol with metadata
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 cljfmt.