File: code-tidy.sh

package info (click to toggle)
kaidan 0.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,240 kB
  • sloc: cpp: 29,895; xml: 1,529; sh: 521; python: 34; makefile: 5
file content (22 lines) | stat: -rwxr-xr-x 910 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2018 Linus Jahn <lnj@kaidan.im>
#
# SPDX-License-Identifier: GPL-3.0-or-later

# Tidy up code to use modern C++

KAIDAN_SOURCES=$(dirname "$(readlink -f "${0}")")/..

mkdir -p .tidy-tmp
cd .tidy-tmp

cmake $KAIDAN_SOURCES -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

# will output an error about moc files: just ignore, we don't want to tidy moc generated files
run-clang-tidy -header-filter='.*' -checks='-*,modernize-avoid-bind,modernize-deprecated-headers,modernize-loop-convert,modernize-make-shared,modernize-make-unique,modernize-pass-by-value,modernize-raw-string-literal,modernize-redundant-void-arg,modernize-replace-auto-ptr,modernize-shrink-to-fit,modernize-use-auto,modernize-use-bool-literals,modernize-use-default,modernize-use-emplace,modernize-use-nullptr,modernize-use-using' -fix

git -C $KAIDAN_SOURCES checkout -- src/singleapp

cd ..
rm -rf .tidy-tmp