formatanalyze 프로젝트의 목표는 CMake 에 작성된 빌드 시스템 코드의 개발 프로세스를 용이하게하는 일련의 도구를 제공하는 것입니다. 이 도구의 주요 아이디어는 다음과 같이 제한되지 않습니다.
CMake 코드 형식 - 언어 구문 분석을 기반으로합니다
최신 CMake 정적 분석 - 가능한 자동 고정을 통한 기본 코드 분석.
구성의 유연성 - 코딩 스타일이 크게 다르므로 크게 다릅니다.
사용하기 쉽습니다-사용자의 학습 곡선을 줄이기 위해 다른 최첨단 도구를 사용하여 사용 및 매개 변수를 모방합니다.
cmake-tidy 는 python3 로 작성된 명령 줄 응용 프로그램입니다.
사용 가능한 부하 명령 :
usage: cmake-tidy [-h] {format} ...
optional arguments:
-h, --help show this help message and exit
sub-commands:
{format} see "cmake-tidy <command> --help" to read more about a specific
sub-command.
format format file to align it to standardformat usage: cmake-tidy format [-h] [--dump-config] [-i] [--diff] [--verbose]
[input [input ...]]
positional arguments:
input CMake file to be formatted
optional arguments:
-h, --help show this help message and exit
--dump-config Dump to stdout current settings. Script tries to read
settings from `.cmake-tidy.json` or provides default
settings. Precedence of searching `.cmake-tidy.json` is
described on github
-i, --inplace Inplace edit specified <input_data> file
--diff Print to stdout unified diff between original file and
formatted version.
--verbose Print to stdout information about formatted file 사용자는 사용자 정의 .cmake-tidy.json 파일을 제공하여 응용 프로그램에 대한 대체 설정을 제공 할 수 있습니다. 사용 가능한 매개 변수 및 값에 대한 자세한 내용은 여기를 방문하십시오.
analyze소개가 진행 중입니다.
응용 프로그램은 유효한 cmake 파일 만 형식화 할 수 있습니다 (구문 오류는 형식화 된 파일의 내용을 수정하지 않고 응용 프로그램을 종료합니다).
--version 명령에 지정된 것보다 구형 버전의 CMake에 대한 deprecated 키워드/속성 지원이 제한 될 수 있습니다. 지원 해야하는 경우 풀 요청을 제공하거나 .cmake-tidy.json 구성 파일의 사용자 정의 키워드로 지정하십시오.
라인 연속 처리는 구현되지 않았습니다.
이 도구는 명령을 사용하여 Python 패키지 색인을 통해 사용할 수 있습니다.
python3 -m pip install cmake-tidy설치가 성공했음을 확인하려면 다음을 수행 할 수 있습니다.
cmake-tidy -v자동 테스트는 워크 플로로 수행됩니다.
ubuntu-lastest, python-3.8
windows-lastest, python-3.8