VirtualBox

Changeset 69264 in vbox for trunk/src/bldprogs


Ignore:
Timestamp:
Oct 25, 2017 10:02:02 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118582
Message:

scm: Configured rewriters for more files. Made verbosity level 2 only show what's changed and what we don't have rewriters for.

Location:
trunk/src/bldprogs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/scm.cpp

    r69261 r69264  
    360360};
    361361
     362static PFNSCMREWRITER const g_aRewritersFor_Xslt[] =
     363{
     364    rewrite_ForceNativeEol,
     365    rewrite_ExpandTabs,
     366    rewrite_StripTrailingBlanks,
     367    rewrite_AdjustTrailingLines,
     368    rewrite_SvnNoExecutable,
     369    rewrite_SvnKeywords,
     370    /** @todo copyright is in an XML comment. */
     371};
     372
     373static PFNSCMREWRITER const g_aRewritersFor_QtResourceFiles[] =
     374{
     375    rewrite_ForceNativeEol,
     376    rewrite_SvnNoExecutable,
     377    rewrite_SvnKeywords,
     378    /** @todo figure out copyright for Qt resource XML files. */
     379};
     380
     381static PFNSCMREWRITER const g_aRewritersFor_QtTranslations[] =
     382{
     383    rewrite_ForceNativeEol,
     384    rewrite_SvnNoExecutable,
     385};
     386
     387static PFNSCMREWRITER const g_aRewritersFor_QtUiFiles[] =
     388{
     389    rewrite_ForceNativeEol,
     390    rewrite_SvnNoExecutable,
     391    rewrite_SvnKeywords,
     392    /** @todo copyright is in an XML 'comment' element. */
     393};
     394
     395
    362396#define SCM_CFG_ENTRY(a_aRewriters, a_fBinary, a_szFilePatterns) \
    363397    { RT_ELEMENTS(a_aRewriters), &a_aRewriters[0], a_fBinary, a_szFilePatterns }
    364398static SCMCFGENTRY const g_aConfigs[] =
    365399{
    366     SCM_CFG_ENTRY(g_aRewritersFor_Makefile_kup, false, "Makefile.kup" ),
    367     SCM_CFG_ENTRY(g_aRewritersFor_Makefile_kmk, false, "Makefile.kmk|Config.kmk" ),
    368     SCM_CFG_ENTRY(g_aRewritersFor_C_and_CPP,    false, "*.c|*.cpp|*.C|*.CPP|*.cxx|*.cc|*.m|*.mm" ),
    369     SCM_CFG_ENTRY(g_aRewritersFor_H_and_HPP,    false, "*.h|*.hpp" ),
    370     SCM_CFG_ENTRY(g_aRewritersFor_RC,           false, "*.rc" ),
    371     SCM_CFG_ENTRY(g_aRewritersFor_ASM,          false, "*.asm|*.mac" ),
    372     SCM_CFG_ENTRY(g_aRewritersFor_DEF,          false, "*.def" ),
    373     SCM_CFG_ENTRY(g_aRewritersFor_ShellScripts, false, "*.sh|configure" ),
    374     SCM_CFG_ENTRY(g_aRewritersFor_BatchFiles,   false, "*.bat|*.cmd|*.btm" ),
    375     SCM_CFG_ENTRY(g_aRewritersFor_BasicScripts, false, "*.vbs|*.vb" ),
    376     SCM_CFG_ENTRY(g_aRewritersFor_SedScripts,   false, "*.sed" ),
    377     SCM_CFG_ENTRY(g_aRewritersFor_Python,       false, "*.py" ),
    378     SCM_CFG_ENTRY(g_aRewritersFor_ScmSettings,  false, "*.scm-settings" ),
    379     SCM_CFG_ENTRY(g_aRewritersFor_Images,       true,  "*.png|*.bmp|*.jpg" ),
     400    SCM_CFG_ENTRY(g_aRewritersFor_Makefile_kup,     false, "Makefile.kup" ),
     401    SCM_CFG_ENTRY(g_aRewritersFor_Makefile_kmk,     false, "*.kmk" ),
     402    SCM_CFG_ENTRY(g_aRewritersFor_C_and_CPP,        false, "*.c|*.cpp|*.C|*.CPP|*.cxx|*.cc|*.m|*.mm" ),
     403    SCM_CFG_ENTRY(g_aRewritersFor_H_and_HPP,        false, "*.h|*.hpp" ),
     404    SCM_CFG_ENTRY(g_aRewritersFor_RC,               false, "*.rc" ),
     405    SCM_CFG_ENTRY(g_aRewritersFor_ASM,              false, "*.asm|*.mac" ),
     406    SCM_CFG_ENTRY(g_aRewritersFor_DEF,              false, "*.def" ),
     407    SCM_CFG_ENTRY(g_aRewritersFor_ShellScripts,     false, "*.sh|configure" ),
     408    SCM_CFG_ENTRY(g_aRewritersFor_BatchFiles,       false, "*.bat|*.cmd|*.btm" ),
     409    SCM_CFG_ENTRY(g_aRewritersFor_BasicScripts,     false, "*.vbs|*.vb" ),
     410    SCM_CFG_ENTRY(g_aRewritersFor_SedScripts,       false, "*.sed" ),
     411    SCM_CFG_ENTRY(g_aRewritersFor_Python,           false, "*.py" ),
     412    SCM_CFG_ENTRY(g_aRewritersFor_ScmSettings,      false, "*.scm-settings" ),
     413    SCM_CFG_ENTRY(g_aRewritersFor_Images,           true,  "*.png|*.bmp|*.jpg" ),
     414    SCM_CFG_ENTRY(g_aRewritersFor_Xslt,             false, "*.xsl" ),
     415    SCM_CFG_ENTRY(g_aRewritersFor_QtResourceFiles,  false, "*.qrc" ),
     416    SCM_CFG_ENTRY(g_aRewritersFor_QtTranslations,   false, "*.ts" ),
     417    SCM_CFG_ENTRY(g_aRewritersFor_QtUiFiles,        false, "*.ui" ),
    380418};
    381419
     
    13941432    if (!pCfg)
    13951433    {
    1396         ScmVerbose(NULL, 4, "skipping '%s': no rewriters configured\n", pszFilename);
     1434        ScmVerbose(NULL, 2, "skipping '%s': no rewriters configured\n", pszFilename);
    13971435        g_cFilesNoRewriters++;
    13981436        return VINF_SUCCESS;
  • trunk/src/bldprogs/scmrw.cpp

    r69261 r69264  
    10011001    Assert(strlen(pszBody) == cchBody);
    10021002    //RTPrintf("--- comment at %u, type %u ---\n%s\n--- end ---\n", pInfo->iLineStart, pInfo->enmType, pszBody);
    1003     ScmVerbose(pState->pState, 4,
     1003    ScmVerbose(pState->pState, 5,
    10041004               "--- comment at %u col %u, %u lines, type %u, %u lines before body, %u lines after body\n",
    10051005               pInfo->iLineStart, pInfo->offStart, pInfo->iLineEnd - pInfo->iLineStart + 1, pInfo->enmType,
     
    11931193
    11941194            fFoundCopyright = true;
    1195             ScmVerbose(pState->pState, 2, "oracle copyright %u-%u: up-to-date=%RTbool well-formed=%RTbool\n",
     1195            ScmVerbose(pState->pState, 3, "oracle copyright %u-%u: up-to-date=%RTbool well-formed=%RTbool\n",
    11961196                       pState->uFirstYear, pState->uLastYear, pState->fUpToDateCopyright, pState->fWellFormedCopyright);
    11971197        }
    11981198        else
    1199             ScmVerbose(pState->pState, 2, "not oracle copyright: '%.*s'\n", pszEnd - pszBody, pszBody);
     1199            ScmVerbose(pState->pState, 3, "not oracle copyright: '%.*s'\n", pszEnd - pszBody, pszBody);
    12001200
    12011201        if (!pszNextLine)
     
    12831283                    /** @todo Check that column 2 contains '*' for C/C++ files. */
    12841284
    1285                     ScmVerbose(pState->pState, 2,
     1285                    ScmVerbose(pState->pState, 3,
    12861286                               "Found license %d/%d at %u..%u: is-correct=%RTbool well-formed=%RTbool external-part=%RTbool open-source=%RTbool\n",
    12871287                               pCur->enmType, pCur->enmOpt, pState->iLineLicense, pState->iLineLicense + pState->cLinesLicense,
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette