Skip to content

Commit 40d5f05

Browse files
committed
Update design document and tweak some other things.
1 parent b28f58a commit 40d5f05

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

docs/RSC-Software-Design.pdf

1.27 KB
Binary file not shown.

src/CMakeSettings.json

+12-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"installRoot": "${projectDir}\\out\\install\\${name}",
1010
"cmakeCommandArgs": "",
1111
"buildCommandArgs": "",
12-
"ctestCommandArgs": ""
12+
"ctestCommandArgs": "",
13+
"enableMicrosoftCodeAnalysis": true
1314
},
1415
{
1516
"name": "x64-Release",
@@ -20,7 +21,8 @@
2021
"cmakeCommandArgs": "",
2122
"buildCommandArgs": "",
2223
"ctestCommandArgs": "",
23-
"inheritEnvironments": [ "msvc_x64_x64" ]
24+
"inheritEnvironments": [ "msvc_x64_x64" ],
25+
"enableMicrosoftCodeAnalysis": true
2426
},
2527
{
2628
"name": "x86-Debug",
@@ -30,7 +32,8 @@
3032
"installRoot": "${projectDir}\\out\\install\\${name}",
3133
"buildCommandArgs": "",
3234
"ctestCommandArgs": "",
33-
"inheritEnvironments": [ "msvc_x86" ]
35+
"inheritEnvironments": [ "msvc_x86" ],
36+
"enableMicrosoftCodeAnalysis": true
3437
},
3538
{
3639
"name": "x86-Release",
@@ -40,7 +43,8 @@
4043
"installRoot": "${projectDir}\\out\\install\\${name}",
4144
"buildCommandArgs": "",
4245
"ctestCommandArgs": "",
43-
"inheritEnvironments": [ "msvc_x86" ]
46+
"inheritEnvironments": [ "msvc_x86" ],
47+
"enableMicrosoftCodeAnalysis": true
4448
},
4549
{
4650
"name": "x64-Clang-Debug",
@@ -51,7 +55,8 @@
5155
"cmakeCommandArgs": "",
5256
"buildCommandArgs": "",
5357
"ctestCommandArgs": "",
54-
"inheritEnvironments": [ "clang_cl_x64_x64" ]
58+
"inheritEnvironments": [ "clang_cl_x64_x64" ],
59+
"enableClangTidyCodeAnalysis": true
5560
},
5661
{
5762
"name": "WSL-GCC-Debug",
@@ -64,7 +69,8 @@
6469
"buildCommandArgs": "",
6570
"ctestCommandArgs": "",
6671
"inheritEnvironments": [ "linux_x64" ],
67-
"wslPath": "${defaultWSLPath}"
72+
"wslPath": "${defaultWSLPath}",
73+
"enableClangTidyCodeAnalysis": true
6874
}
6975
]
7076
}

src/ct/Editor.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -2103,6 +2103,17 @@ word Editor::DeleteSpecialFunction(const CodeWarning& log)
21032103

21042104
//------------------------------------------------------------------------------
21052105

2106+
word Editor::DemoteFunction(const CodeWarning& log)
2107+
{
2108+
Debug::ft("Editor.DemoteFunction");
2109+
2110+
// Move the function to the derived class specified in the log.
2111+
//
2112+
return Unimplemented();
2113+
}
2114+
2115+
//------------------------------------------------------------------------------
2116+
21062117
void Editor::Display(ostream& stream,
21072118
const string& prefix, const Flags& options) const
21082119
{
@@ -3821,6 +3832,8 @@ word Editor::FixWarning(const CodeWarning& log)
38213832
return FixDatas(log);
38223833
case FunctionShouldBeStatic:
38233834
return FixFunctions(log);
3835+
case FunctionCouldBeDemoted:
3836+
return DemoteFunction(log);
38243837
case NoEndlineAtEndOfFile:
38253838
return AppendEndline();
38263839
case AutoCopiesReference:

src/ct/Editor.h

+1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ class Editor : public Lexer
174174
static word ChangeMemberToFree(const CodeWarning& log);
175175
word ChangeOperator(const CodeWarning& log);
176176
word ChangeStructToClass(const CodeWarning& log);
177+
word DemoteFunction(const CodeWarning& log);
177178
word EraseAdjacentSpaces(const CodeWarning& log);
178179
word EraseAccessControl(const CodeWarning& log);
179180
word EraseBlankLine(const CodeWarning& log);

0 commit comments

Comments
 (0)