Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
atools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo
atools
Commits
20c24665
Commit
20c24665
authored
Jul 31, 2019
by
Leo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make double_underscore_in_variable more robust
parent
09e2cec3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
apkbuild-lint
apkbuild-lint
+7
-1
No files found.
apkbuild-lint
View file @
20c24665
...
...
@@ -230,7 +230,13 @@ pkgname_used_in_source() {
double_underscore_in_variable
()
{
[
"
$SKIP_DOUBLE_UNDERSCORE_IN_VARIABLE
"
]
&&
return
0
[
"
$SKIP_AL30
"
]
&&
return
0
scan
'(^|\t)(local ([A-Za-z_])?.*)?__.*(=)?'
'double underscore on variables are reserved'
'AL30'
'MC'
# Run this twice, once which will detect variables without the local keyword
# which requires matching the = sign at the end. The second time will match
# for variables declared with the local keyword which do not require the =
# sign
scan
'(^|\t)?__[A-Za-z0-9_].*='
'double underscore on variables are reserved'
'AL30'
'MC'
scan
'(^|\t)local ([A-Za-z0-9_])?.*__[A-Za-z0-9_].*(=)?'
'double underscore on variables are reserved'
'AL30'
'MC'
}
}
_run_apkbuild_leo
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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