Skip to content
Browse files

Add description of file/namespace name consistency checks to README

  • Loading branch information...
1 parent caab90b commit c1d98ed5c4595a4b65e1f707e122c04c1c1a0047 @jafingerhut jafingerhut committed Jan 24, 2014
Showing with 23 additions and 0 deletions.
  1. +23 −0 README.next.md
View
23 README.next.md
@@ -1,3 +1,26 @@
+### Check consistency of namespace and file names
+
+When doing `require` or `use` on a namespace like `foo.bar.baz-tests`,
+it is searched for in the Java classpath in a file named
+`foo/bar/baz_tests.clj` (on Unix-like systems) or
+`foo\bar\baz_tests.clj` (on Windows). Dots become path separator
+characters and dashes become underscores.
+
+Such a file will normally have an `ns` form with the specified
+namespace. If it does not match the file it is in, then undesirable
+things can happen. For example, `require` could fail to find the
+namespace, or Leiningen could fail to run the tests defined in a test
+namespace.
+
+Eastwood checks all Clojure files in `:source-paths` and `:test-paths`
+when starting up (or only one of them, if only one is specified in the
+`:namespaces` sequence in the command options). If there are any
+mismatches between file names and the namespace names in the `ns`
+forms, an error message will be printed and no linting will be done at
+all. This helps avoid some cases of printing error messages that make
+it difficult to determine what went wrong. Fix the problems indicated
+and try again.
+
### `:bad-arglists` - arglists that does not match the actual number of arguments that a function/macro was defined to take

0 comments on commit c1d98ed

Please sign in to comment.
Something went wrong with that request. Please try again.