2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Plumb in codespell with a "make spell" target.

This commit is contained in:
Todd C. Miller 2020-05-07 07:50:11 -06:00
parent 04cb06160a
commit 7f2585ed0a
5 changed files with 78 additions and 1 deletions

View File

@ -57,12 +57,15 @@ doc/sudoreplay.man.in
doc/sudoreplay.mdoc.in
doc/visudo.man.in
doc/visudo.mdoc.in
etc/codespell.exclude
etc/codespell.ignore
etc/codespell.skip
etc/init.d/aix.sh.in
etc/init.d/hpux.sh.in
etc/init.d/sudo.conf.in
etc/sudo.pp
etc/sudo-logsrvd.pp
etc/sudo-python.pp
etc/sudo.pp
examples/Makefile.in
examples/pam.conf
examples/sudo.conf.in

View File

@ -125,6 +125,9 @@ reformat: uncrustify.files
check-format: uncrustify.files
( cd $(top_srcdir) && uncrustify -c etc/uncrustify.cfg --check -F $(top_builddir)/uncrustify.files )
spell:
( cd $(top_srcdir) && codespell -I etc/codespell.ignore -x etc/codespell.exclude `egrep -v -f etc/codespell.skip MANIFEST` )
cppcheck: config.status
rval=0; \
for d in $(SUBDIRS); do \

32
etc/codespell.exclude Normal file
View File

@ -0,0 +1,32 @@
* Returns true if any tags set in nt differ between ot and nt, else false.
#define TAGS_CHANGED(ot, nt) \
((TAG_SET((nt).follow) && (nt).follow != (ot).follow) || \
(TAG_SET((nt).log_input) && (nt).log_input != (ot).log_input) || \
(TAG_SET((nt).log_output) && (nt).log_output != (ot).log_output) || \
(TAG_SET((nt).noexec) && (nt).noexec != (ot).noexec) || \
(TAG_SET((nt).nopasswd) && (nt).nopasswd != (ot).nopasswd) || \
(TAG_SET((nt).setenv) && (nt).setenv != (ot).setenv) || \
(TAG_SET((nt).send_mail) && (nt).send_mail != (ot).send_mail))
sv sw ta te tg th tr uk ur vi wa wo zh_CN zh_HK
if (!PyArg_ParseTupleAndKeywords(py_args ? py_args : py_empty, py_kwargs, "Ois|i:sudo.ConvMessage", keywords,
$ans = <STDIN>;
if ($ans =~ /^[yY]/) {
.nr BA @BAMAN@
.if \n(BA \{\
.Nd convert between sudoers file formats
.Nd configuration for sudo front end
.Nd execute a command as another user
.Nd Sudo log server protocol
.Nd configuration for sudo_logsrvd
.Nd sudo event and I/O log server
.Nd Sudo Plugin API
.Nd Sudo Plugin API (Python)
.Nd send sudo I/O log to log server
.Nd sudo LDAP configuration
.Nd default sudo security policy plugin
.Nd Sudoers Time Stamp Format
.Nd replay sudo session logs
.Nd edit the sudoers file
* If path doesn't end in /, return true iff cmnd & path name the same inode;
* Tim Fraser
echo ".Nd sudo" >> conftest

14
etc/codespell.ignore Normal file
View File

@ -0,0 +1,14 @@
Ois
SOM
VAS
alloced
edn
fIDN
ist
numer
pleas
sav
thur
toke
vas
wit

25
etc/codespell.skip Normal file
View File

@ -0,0 +1,25 @@
\.in\.sed$
/data
Makefile\.in
^ChangeLog$
^MANIFEST$
^aclocal\.m4$
^autogen\.sh$
^config\.guess$
^config\.h\.in$
^config\.sub$
^configure$
^doc/.*\.man\.in$
^doc/CONTRIBUTORS$
^etc/codespell
^lib/util/fnmatch\.c$
^lib/util/getaddrinfo\.c$
^lib/zlib/
^libtool$
^ltmain\.sh$
^m4/libtool\.m4$
^m4/lt.*\.m4$
^mkinstalldirs$
^plugins/sudoers/po/
^po/
^scripts/pp$