3 # Midnight Commander - check source code indentation
6 # The Free Software Foundation, Inc.
9 # Slava Zanko <slavazanko@gmail.com>, 2015
11 # This file is part of the Midnight Commander.
13 # The Midnight Commander is free software: you can redistribute it
14 # and/or modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation, either version 3 of the License,
16 # or (at your option) any later version.
18 # The Midnight Commander is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
29 findUnindentedFiles
() {
31 find "${directory}" -name '*.[ch]' -print0 | \
34 --format-first-column-comments \
39 --blank-lines-after-procedures
40 return $
(git ls-files
--modified |
wc -l)
43 ( findUnindentedFiles
"lib" && findUnindentedFiles
"src" && findUnindentedFiles
"tests" ) ||
{
44 echo "Sources not indented"
45 git ls-files
--modified