Merge pull request #172 from starkos/fix-project-type-validation

Move project language and kind checks to validation.lua
This commit is contained in:
Manu Evans 2015-07-27 20:44:03 +10:00
commit 2706449670
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]