nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
contracts: Modification contracts creation
[nit.git]
/
src
/
nitpick.nit
diff --git
a/src/nitpick.nit
b/src/nitpick.nit
index
44cab72
..
4e211b4
100644
(file)
--- a/
src/nitpick.nit
+++ b/
src/nitpick.nit
@@
-49,9
+49,16
@@
var model = new Model
# A model builder to parse files
var modelbuilder = new ModelBuilder(model, toolcontext)
# A model builder to parse files
var modelbuilder = new ModelBuilder(model, toolcontext)
-# Here we load an process all modules passed on the command line
+# Here we load and process all modules passed on the command line
var mmodules = modelbuilder.parse_full(arguments)
toolcontext.mmodules_to_check.add_all mmodules
var mmodules = modelbuilder.parse_full(arguments)
toolcontext.mmodules_to_check.add_all mmodules
+# Blacklist warnings of not explicitly required modules
+for mm in model.mmodules do
+ if mmodules.has(mm) then continue
+ toolcontext.warning_blacklist[mm.location.file].add("all")
+end
+
modelbuilder.run_phases
toolcontext.run_global_phases(mmodules)
modelbuilder.run_phases
toolcontext.run_global_phases(mmodules)
+if toolcontext.error_count > 0 then exit(1)