Changeset 69211 in vbox for trunk/src/bldprogs/scmrw.cpp
- Timestamp:
- Oct 24, 2017 1:53:05 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bldprogs/scmrw.cpp
r69176 r69211 1014 1014 cchWellFormed = RTStrPrintf(szWellFormed, sizeof(szWellFormed), "Copyright (C) %u-%u %s", 1015 1015 pState->uFirstYear, pState->uLastYear, g_szCopyrightHolder); 1016 pState->fUpToDateCopyright = pState->uLastYear == g_uYear; 1017 pState->iLineCopyright = iLine; 1016 1018 pState->fWellFormedCopyright = cchWellFormed == (uintptr_t)(pszEnd - pszBody) 1017 1019 && memcmp(pszBody, szWellFormed, cchWellFormed) == 0; 1018 pState->fUpToDateCopyright = pState->uLastYear == g_uYear;1019 pState->iLineCopyright = iLine;1020 if (!pState->fWellFormedCopyright) 1021 ScmVerbose(pState->pState, 1, "* copyright isn't well formed\n"); 1020 1022 1021 1023 /* If there wasn't exactly one blank line before the comment, trigger a rewrite. */ 1022 1024 if (pInfo->cBlankLinesBefore != 1) 1025 { 1026 ScmVerbose(pState->pState, 1, "* copyright comment is preceeded by %u blank lines instead of 1\n", 1027 pInfo->cBlankLinesBefore); 1023 1028 pState->fWellFormedCopyright = false; 1029 } 1024 1030 1025 1031 /* If the comment doesn't start in column 1, trigger rewrite. */ 1026 1032 if (pInfo->offStart != 0) 1027 1033 { 1034 ScmVerbose(pState->pState, 1, "* copyright comment starts in column %u instead of 1\n", pInfo->offStart + 1); 1028 1035 pState->fWellFormedCopyright = false; 1029 1036 /** @todo check that there isn't any code preceeding the comment. */ … … 1096 1103 : pCur->enmType == kScmLicenseType_Confidential; 1097 1104 pState->fWellFormedLicense = memcmp(pszBody, pCur->psz, pCur->cch - 1) == 0; 1105 if (!pState->fWellFormedLicense) 1106 ScmVerbose(pState->pState, 1, "* license text isn't well-formed\n"); 1098 1107 1099 1108 /* If there was more than one blank line between the copyright and the … … 1101 1110 if (cBlankLinesAfterCopyright > 1) 1102 1111 { 1112 ScmVerbose(pState->pState, 1, "* %u blank lines between copyright and license text, instead of 1\n", 1113 cBlankLinesAfterCopyright); 1103 1114 pState->iLineLicense -= cBlankLinesAfterCopyright - 1; 1104 1115 pState->cLinesLicense += cBlankLinesAfterCopyright - 1; … … 1108 1119 /* If there was more than one blank line after the license, trigger a rewrite. */ 1109 1120 if (!fExternal && pInfo->cBlankLinesAfter != 1) 1121 { 1122 ScmVerbose(pState->pState, 1, "* copyright comment is followed by %u blank lines instead of 1\n", 1123 pInfo->cBlankLinesAfter); 1110 1124 pState->fWellFormedLicense = false; 1125 } 1111 1126 1112 1127 /** @todo Check that the last comment line doesn't have any code on it. */
Note:
See TracChangeset
for help on using the changeset viewer.