Move project language and kind checks to validation.lua

These validation checks were added to oven.lua by a previous commit. Move them over to validation.lua with the rest of the validation logic.
This commit is contained in:
Jason Perkins 2015-07-26 18:31:08 -04:00
parent d25e1061d0
commit e4f2dd7639
2 changed files with 8 additions and 12 deletions

View File

@ -117,18 +117,6 @@
function p.project.bake(self)
local sln = self.solution
-- check if the language for this project is supported by the action.
if not p.action.supports(self.language) then
p.warn(" Unsupported language '%s' used for '%s'.", self.language, self.name)
end
-- check if the kind for this project is supported by the action.
if not p.action.supports(self.kind) then
p.warn(" Unsupported kind '%s' used for '%s'.", self.kind, self.name)
end
-- Add filtering terms to the context to make it as specific as I can.
-- Start with the same filtering that was applied at the solution level.

View File

@ -55,6 +55,14 @@
p.error("project '%s' does not have a language", self.name)
end
if not p.action.supports(self.language) then
p.warn("unsupported language '%s' used for project '%s'", self.language, self.name)
end
if not p.action.supports(self.kind) then
p.warn("unsupported kind '%s' used for project '%s'", self.kind, self.name)
end
-- all rules must exist
for i = 1, #self.rules do
local rule = self.rules[i]