diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-18 23:25:35 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-18 23:25:35 -0200 |
commit | 1cc2c9028d03ddf15840d5138db518ab4fa26d44 (patch) | |
tree | e0f74254af30ef32a75cacaeb99a7461a463c0f9 | |
parent | c34e7ba35b66d5ffaaae2b04b2a814a2a95fd6a3 (diff) | |
download | luarocks-1cc2c9028d03ddf15840d5138db518ab4fa26d44.tar.gz luarocks-1cc2c9028d03ddf15840d5138db518ab4fa26d44.tar.bz2 luarocks-1cc2c9028d03ddf15840d5138db518ab4fa26d44.zip |
Add check that will be used to ensure no rocks without licenses are uploaded.
Closes #202.
-rw-r--r-- | src/luarocks/lint.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/luarocks/lint.lua b/src/luarocks/lint.lua index 62ced64d..e3bf34b5 100644 --- a/src/luarocks/lint.lua +++ b/src/luarocks/lint.lua | |||
@@ -37,5 +37,17 @@ function run(...) | |||
37 | return nil, "Failed loading rockspec: "..err | 37 | return nil, "Failed loading rockspec: "..err |
38 | end | 38 | end |
39 | 39 | ||
40 | return true | 40 | local ok = true |
41 | |||
42 | -- This should have been done in the type checker, | ||
43 | -- but it would break compatibility of other commands. | ||
44 | -- Making 'lint' alone be stricter shouldn't be a problem, | ||
45 | -- because extra-strict checks is what lint-type commands | ||
46 | -- are all about. | ||
47 | if not rs.description.license then | ||
48 | util.printerr("Rockspec has no license field.") | ||
49 | ok = false | ||
50 | end | ||
51 | |||
52 | return ok, ok or filename.." failed consistency checks." | ||
41 | end | 53 | end |