Merge pull request #172 from starkos/fix-project-type-validation
Move project language and kind checks to validation.lua
This commit is contained in:
commit
2706449670
@ -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.
|
||||
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user