Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a file path into an error message while reading a file fixes #405 #212

Merged
merged 1 commit into from
Aug 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added a file path into an error message while reading a file fixes #405
  • Loading branch information
LukasRychtecky committed Mar 1, 2018
commit 67e39ce7e57a8372a8029dba1b147d4ac8772e3d
10 changes: 7 additions & 3 deletions kibit/src/kibit/driver.clj
Original file line number Diff line number Diff line change
@@ -53,9 +53,13 @@
cli-reporter)
:rules (or rules all-rules))
(catch Exception e
(binding [*out* *err*]
(println "Check failed -- skipping rest of file")
(println (.getMessage e))))))
(let [e-info (ex-data e)]
(binding [*out* *err*]
(println (format "Check failed -- skipping rest of file (%s:%s:%s)"
(.getPath file)
(:line e-info)
(:column e-info)))
(println (.getMessage e)))))))
source-files))

(defn run [source-paths rules & args]