svn commit: r271322 - user/crees/rclint
Chris Rees
crees at FreeBSD.org
Tue Sep 9 17:16:07 UTC 2014
Author: crees (doc,ports committer)
Date: Tue Sep 9 17:16:06 2014
New Revision: 271322
URL: http://svnweb.freebsd.org/changeset/base/271322
Log:
Check for desc line too
Modified:
user/crees/rclint/errors.en
user/crees/rclint/rclint.py
Modified: user/crees/rclint/errors.en
==============================================================================
--- user/crees/rclint/errors.en Tue Sep 9 17:03:58 2014 (r271321)
+++ user/crees/rclint/errors.en Tue Sep 9 17:16:06 2014 (r271322)
@@ -25,6 +25,8 @@ rcorder_order rcorder block in the wrong
rcsid Missing FreeBSD RCSId keyword All rc scripts must contain a line beginning # $FreeBSD$. Do not include blank lines without comment markers at the beginning (#) until the script begins
+no_description No description included All rc files should include a variable desc="Description of the service"
+
rcvar_incorrect rcvar is not set correctly rcvar must be directly set to name_enable. Do not quote, and do not use indirection; ${name}_enable is slower than example_enable. `set_rcvar` was removed from FreeBSD in January 2012, so definitely do not use that
run_rc_argument Incorrect argument to run_rc_command The last line of the file should be run_rc_command $1
Modified: user/crees/rclint/rclint.py
==============================================================================
--- user/crees/rclint/rclint.py Tue Sep 9 17:03:58 2014 (r271321)
+++ user/crees/rclint/rclint.py Tue Sep 9 17:16:06 2014 (r271322)
@@ -27,7 +27,7 @@
__version__ = '$FreeBSD$'
MAJOR = 0
-MINOR = 1
+MINOR = 2
MICRO = 0
DATADIR = '.'
@@ -143,7 +143,7 @@ class Variable(Statement):
lines[number+self.length]))
self.length += 1
self.type = (
- 'init' if self.name in ('name', 'rcvar') else 'basic')
+ 'init' if self.name in ('name', 'desc', 'rcvar') else 'basic')
elif line[:4] == 'eval':
self.value = line
@@ -421,6 +421,14 @@ def do_rclint(filename):
if v.is_empty():
error.give('value_empty', v.line)
+ descexists = False
+ for v in lineobj['Variable']:
+ if v.name == 'desc':
+ descexists = False
+ break
+ if not descexists:
+ error.give('no_description')
+
logging.debug('Checking for rcvar set correctly')
for var in lineobj['Variable']:
if var.name == 'name':
More information about the svn-src-user
mailing list