Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
bb217a48
Commit
bb217a48
authored
Jul 24, 2022
by
Alain Laporte
Committed by
Christoph Cullmann
Jul 25, 2022
Browse files
php_parser: reduce scope variable detected by code quality scanning
parent
df82d410
Pipeline
#208967
passed with stage
in 6 minutes and 49 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
addons/symbolviewer/php_parser.cpp
View file @
bb217a48
...
...
@@ -88,13 +88,12 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
QRegularExpressionMatch
match
,
matchClass
,
matchInterface
,
matchFunctionArg
;
QRegularExpressionMatchIterator
matchFunctionArgs
;
int
i
,
pos
;
bool
inBlockComment
=
false
;
bool
inClass
=
false
,
inFunction
=
false
;
// QString debugBuffer("SymbolViewer(PHP), line %1 %2 → [%3]");
for
(
i
=
0
;
i
<
kv
->
lines
();
i
++
)
{
for
(
int
i
=
0
;
i
<
kv
->
lines
();
i
++
)
{
// kdDebug(13000) << debugBuffer.arg(i, 4).arg("=origin", 10).arg(kv->line(i));
// keeping a copy of the line without any processing
...
...
@@ -116,7 +115,7 @@ void KatePluginSymbolViewerView::parsePhpSymbols(void)
// kdDebug(13000) << debugBuffer.arg(i, 4).arg("-comments", 10).arg(line);
// trying to find comments and to remove commented parts
pos
=
line
.
indexOf
(
QLatin1Char
(
'#'
));
int
pos
=
line
.
indexOf
(
QLatin1Char
(
'#'
));
if
(
pos
>=
0
)
{
line
.
truncate
(
pos
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment