16cad8c54SRyan Zezeski.\" 26cad8c54SRyan Zezeski.\" This file and its contents are supplied under the terms of the 36cad8c54SRyan Zezeski.\" Common Development and Distribution License ("CDDL"), version 1.0. 46cad8c54SRyan Zezeski.\" You may only use this file in accordance with the terms of version 56cad8c54SRyan Zezeski.\" 1.0 of the CDDL. 66cad8c54SRyan Zezeski.\" 76cad8c54SRyan Zezeski.\" A full copy of the text of the CDDL should have accompanied this 86cad8c54SRyan Zezeski.\" source. A copy of the CDDL is also available via the Internet at 96cad8c54SRyan Zezeski.\" http://www.illumos.org/license/CDDL. 106cad8c54SRyan Zezeski.\" 116cad8c54SRyan Zezeski.\" 126cad8c54SRyan Zezeski.\" Copyright 2011 Richard Lowe. 136cad8c54SRyan Zezeski.\" Copyright 2015 Elysium Digital, L.L.C. 14eabe844aSJohn Levon.\" Copyright 2018 Joyent, Inc. 15d75eb3e5SBill Sommerfeld.\" Copyright 2024 Bill Sommerfeld <sommerfeld@hamachi.org> 166cad8c54SRyan Zezeski.\" 17d75eb3e5SBill Sommerfeld.Dd February 1, 2024 18d75eb3e5SBill Sommerfeld.Dt GIT-PBCHK 1ONBLD 19d75eb3e5SBill Sommerfeld.Os 20d75eb3e5SBill Sommerfeld.Sh NAME 21d75eb3e5SBill Sommerfeld.Nm git-pbchk , 22d75eb3e5SBill Sommerfeld.Nm git-nits 23d75eb3e5SBill Sommerfeld.Nd nits and pre-putback checks for git 24d75eb3e5SBill Sommerfeld.Sh SYNOPSIS 25d75eb3e5SBill Sommerfeld.Nm git-pbchk 26*28e88f55SBill Sommerfeld.Fl l 27*28e88f55SBill Sommerfeld.Nm git-pbchk 28*28e88f55SBill Sommerfeld.Op Fl c Ar check Ns ... 29d75eb3e5SBill Sommerfeld.Op Fl p Ar branch 30d75eb3e5SBill Sommerfeld.Nm git-nits 31*28e88f55SBill Sommerfeld.Op Fl c Ar check Ns ... 32d75eb3e5SBill Sommerfeld.Op Fl p Ar branch 33d75eb3e5SBill Sommerfeld.Op Ar file Ns ... 34d75eb3e5SBill Sommerfeld.Sh DESCRIPTION 35d75eb3e5SBill SommerfeldCheck your workspace for common nits and putback-ending mistakes. 36d75eb3e5SBill SommerfeldA simple set of checks are run over various parts of your workspace 37d75eb3e5SBill Sommerfeldand errors encountered are reported, all of which should, generally, 38d75eb3e5SBill Sommerfeldbe fixed. 39d75eb3e5SBill Sommerfeld.Pp 40d75eb3e5SBill SommerfeldAs these command names start with 41d75eb3e5SBill Sommerfeld.Sq git- 42d75eb3e5SBill Sommerfeldthey can also be run by 43d75eb3e5SBill Sommerfeld.Xr git 1 44d75eb3e5SBill Sommerfeldas subcommands: 45d75eb3e5SBill Sommerfeld.Pp 46d75eb3e5SBill Sommerfeld.Dl $ git pbchk 47d75eb3e5SBill Sommerfeld.Sh OPTIONS 48d75eb3e5SBill Sommerfeld.Bl -tag -width 6n 49d75eb3e5SBill Sommerfeld.It Fl c Ar check 50d75eb3e5SBill SommerfeldRun the specific 51d75eb3e5SBill Sommerfeld.Ar check , 52d75eb3e5SBill Sommerfeldas named below. 53eabe844aSJohn LevonIn this mode, individual files can be provided to check. 54*28e88f55SBill SommerfeldMultiple 55*28e88f55SBill Sommerfeld.Fl c 56*28e88f55SBill Sommerfeldoptions can be supplied, and will run the named checks in the order given on 57*28e88f55SBill Sommerfeldthe command line. 58d75eb3e5SBill Sommerfeld.It Fl p Ar branch 59d75eb3e5SBill SommerfeldCompare the current workspace to the parent 60d75eb3e5SBill Sommerfeld.Ar branch 61d75eb3e5SBill Sommerfeldfor the purposes of generating file and comment lists. 62d75eb3e5SBill Sommerfeld.Pp 63d75eb3e5SBill SommerfeldIf this option is not specified an attempt is made to determine this 64d75eb3e5SBill Sommerfeldautomatically, if the git branch configuration contains this information. 65d75eb3e5SBill Sommerfeld.Pp 66d75eb3e5SBill SommerfeldIf no branch is specified and none can be determined automatically 67d75eb3e5SBill Sommerfeld.Pa origin/master 68d75eb3e5SBill Sommerfeldis used. 69*28e88f55SBill Sommerfeld.It Fl l 70*28e88f55SBill SommerfeldPrint a list of the checks that can be used with 71*28e88f55SBill Sommerfeld.Fl c , 72*28e88f55SBill Sommerfeldwith a short description of each one. 73d75eb3e5SBill Sommerfeld.El 74d75eb3e5SBill Sommerfeld.Sh CHECKS 75d75eb3e5SBill Sommerfeld.Bl -tag -width 6n 76d75eb3e5SBill Sommerfeld.It Comment format: Cm comchk 77d75eb3e5SBill SommerfeldCheck that putback comments follow the prescribed format 78d75eb3e5SBill Sommerfeld.Pq only run for pbchk . 79d75eb3e5SBill Sommerfeld.It Copyrights: Cm copyright 80eabe844aSJohn LevonCheck that each source file contains a copyright notice for the current 81d75eb3e5SBill Sommerfeldyear\. You don't need to fix this if you, the potential new copyright holder, 82d75eb3e5SBill Sommerfeldchooses not to 83d75eb3e5SBill Sommerfeld.It C style: Cm cstyle 84c82c4676SGordon RossCheck that C source files conform to the illumos C style rules 85d75eb3e5SBill Sommerfeld.It Header check: Cm hdrchk 86d75eb3e5SBill SommerfeldCheck that C header files conform to the illumos header style rules 87d75eb3e5SBill Sommerfeld.Pq in addition to the general C rules . 88d75eb3e5SBill Sommerfeld.It Java style: Cm jstyle 89d75eb3e5SBill SommerfeldCheck that Java source files conform to the illumos Java style rules 90d75eb3e5SBill Sommerfeld.Pq which differ from the traditionally recommended Java style . 91d75eb3e5SBill Sommerfeld.It SCCS Keywords: Cm keywords 92d75eb3e5SBill SommerfeldCheck that no source files contain unexpanded SCCS keywords. 93d75eb3e5SBill SommerfeldIt is possible that this check may false positive on certain inputs. 94d75eb3e5SBill SommerfeldIt is generally obvious when this is the case. 95d75eb3e5SBill Sommerfeld.Pp 96d75eb3e5SBill SommerfeldThis check does not check for expanded SCCS keywords, though the common 97d75eb3e5SBill Sommerfeld.Sq ident Ns 98d75eb3e5SBill Sommerfeld-style lines should be removed regardless of whether they are 99d75eb3e5SBill Sommerfeldexpanded. 100d75eb3e5SBill Sommerfeld.It Man page check: Cm manlint 101eabe844aSJohn LevonCheck for problems with man pages. 102d75eb3e5SBill Sommerfeld.It Mapfile check: Cm mapfilechk 103d75eb3e5SBill SommerfeldCheck that linker mapfiles contain a comment directing anyone editing to 104d75eb3e5SBill Sommerfeldread the directions in 105d75eb3e5SBill Sommerfeld.Pa usr/lib/README.mapfiles . 106d75eb3e5SBill Sommerfeld.It Shell script check: Cm shelllint 107d75eb3e5SBill SommerfeldCheck for problems with shell scripts. 108d75eb3e5SBill Sommerfeld.It Package manifest formatting: Cm pkgfmt 109d75eb3e5SBill SommerfeldCheck package manifests for common errors. 110d75eb3e5SBill Sommerfeld.It Windows special filename check Cm winnames 111d75eb3e5SBill SommerfeldCheck for filenames which would prevent you from checking out 112d75eb3e5SBill Sommerfeldillumos-gate on a Windows system. 113d75eb3e5SBill Sommerfeld.It Whitespace check: Cm wscheck 114eabe844aSJohn LevonCheck for whitespace issues such as mixed tabs/spaces in source files. 115d75eb3e5SBill Sommerfeld.It Committed symlinks check: Cm symlinks 116d75eb3e5SBill SommerfeldReport if there are any symlinks checked into your change; they are 117d75eb3e5SBill Sommerfeldnot allowed by illumos policy. 118d75eb3e5SBill Sommerfeld.El 119d75eb3e5SBill Sommerfeld.Sh FILES 120d75eb3e5SBill SommerfeldException lists can be used to exclude certain files from checks, named after 121eabe844aSJohn Levonthe specific check. 122d75eb3e5SBill SommerfeldThey can be found in 123d75eb3e5SBill Sommerfeld.Pa $CODEMGR_WS/exception_lists , 124d75eb3e5SBill Sommerfeldor optionally under 125d75eb3e5SBill Sommerfeld.Pa $CODEMGR_WS/.git/info/ , 126d75eb3e5SBill Sommerfeldwhere they must be suffixed 127d75eb3e5SBill Sommerfeld.Pa .NOT . 128d75eb3e5SBill Sommerfeld.Sh SEE ALSO 129d75eb3e5SBill Sommerfeld.Xr git 1 130