-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileGlobs.py: Recursively extract .npmignore globs #168
base: master
Are you sure you want to change the base?
Conversation
tests/generation/FileGlobs.py
Outdated
self.log_printer, self.printer, os.getcwd())[0]), | ||
sorted(files)) | ||
|
||
os.remove(os.path.join("other_folder",".npmignore")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E231 missing whitespace after ',''
PycodestyleBear (E231), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join(os.getcwd(), "other_folder"), | ||
os.path.join(os.getcwd(), "sample_data", "data")] | ||
|
||
globs = list(get_npmignore_glob(os.getcwd(),npmignore_dir_list)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E231 missing whitespace after ',''
PycodestyleBear (E231), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("src", "abc.pyc"), | ||
os.path.join("other_folder","test.html"), | ||
os.path.join("sample_data","data","test.css"), | ||
"run.pyc"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
"upload.c", | ||
os.path.join("src", "abc.pyc"), | ||
os.path.join("other_folder","test.html"), | ||
os.path.join("sample_data","data","test.css"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E231 missing whitespace after ',''
PycodestyleBear (E231), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
"upload.c", | ||
os.path.join("src", "abc.pyc"), | ||
os.path.join("other_folder","test.html"), | ||
os.path.join("sample_data","data","test.css"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E231 missing whitespace after ',''
PycodestyleBear (E231), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
"upload.c", | ||
os.path.join("src", "abc.pyc"), | ||
os.path.join("other_folder","test.html"), | ||
os.path.join("sample_data","data","test.css"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
"glob2.py", | ||
"upload.c", | ||
os.path.join("src", "abc.pyc"), | ||
os.path.join("other_folder","test.html"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E231 missing whitespace after ',''
PycodestyleBear (E231), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
"glob2.py", | ||
"upload.c", | ||
os.path.join("src", "abc.pyc"), | ||
os.path.join("other_folder","test.html"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("src", "ignore.c"), | ||
"glob2.py", | ||
"upload.c", | ||
os.path.join("src", "abc.pyc"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
"ignore.c", | ||
os.path.join("src", "ignore.c"), | ||
"glob2.py", | ||
"upload.c", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("src", "build", "main.c"), | ||
"ignore.c", | ||
os.path.join("src", "ignore.c"), | ||
"glob2.py", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("tests", "run.c"), | ||
os.path.join("src", "build", "main.c"), | ||
"ignore.c", | ||
os.path.join("src", "ignore.c"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
ignored_files = [os.path.join("build", "main.c"), | ||
os.path.join("tests", "run.c"), | ||
os.path.join("src", "build", "main.c"), | ||
"ignore.c", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
".coafile"] | ||
ignored_files = [os.path.join("build", "main.c"), | ||
os.path.join("tests", "run.c"), | ||
os.path.join("src", "build", "main.c"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("sample_data", "example.py"), | ||
".coafile"] | ||
ignored_files = [os.path.join("build", "main.c"), | ||
os.path.join("tests", "run.c"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("other_folder", "new_file.c"), | ||
os.path.join("sample_data", "data", "new_script.js"), | ||
os.path.join("sample_data", "example.py"), | ||
".coafile"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("src", "upload.c"), | ||
os.path.join("other_folder", "new_file.c"), | ||
os.path.join("sample_data", "data", "new_script.js"), | ||
os.path.join("sample_data", "example.py"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("src", "abc.py"), | ||
os.path.join("src", "upload.c"), | ||
os.path.join("other_folder", "new_file.c"), | ||
os.path.join("sample_data", "data", "new_script.js"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("src", "tests", "main.c"), | ||
os.path.join("src", "abc.py"), | ||
os.path.join("src", "upload.c"), | ||
os.path.join("other_folder", "new_file.c"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("src", "lib", "ssl.c"), | ||
os.path.join("src", "tests", "main.c"), | ||
os.path.join("src", "abc.py"), | ||
os.path.join("src", "upload.c"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.path.join("src", "main.h"), | ||
os.path.join("src", "lib", "ssl.c"), | ||
os.path.join("src", "tests", "main.c"), | ||
os.path.join("src", "abc.py"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
files = [os.path.join("src", "main.c"), | ||
os.path.join("src", "main.h"), | ||
os.path.join("src", "lib", "ssl.c"), | ||
os.path.join("src", "tests", "main.c"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.chdir("file_globs_npmignore_testfiles") | ||
files = [os.path.join("src", "main.c"), | ||
os.path.join("src", "main.h"), | ||
os.path.join("src", "lib", "ssl.c"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
os.chdir(os.path.dirname(os.path.realpath(__file__))) | ||
os.chdir("file_globs_npmignore_testfiles") | ||
files = [os.path.join("src", "main.c"), | ||
os.path.join("src", "main.h"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent'
PycodestyleBear (E128), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
self.log_printer, self.printer, os.getcwd())[0]), | ||
sorted(files)) | ||
|
||
os.remove(os.path.join("other_folder",".npmignore")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/tests/generation/FileGlobs.py
+++ b/tests/generation/FileGlobs.py
@@ -191,7 +191,7 @@
self.log_printer, self.printer, os.getcwd())[0]),
sorted(files))
- os.remove(os.path.join("other_folder",".npmignore"))
+ os.remove(os.path.join("other_folder", ".npmignore"))
os.remove(os.path.join("sample_data", "data", ".npmignore"))
os.remove(".npmignore")
os.chdir(orig_cwd)
tests/generation/FileGlobs.py
Outdated
os.path.join(os.getcwd(), "other_folder"), | ||
os.path.join(os.getcwd(), "sample_data", "data")] | ||
|
||
globs = list(get_npmignore_glob(os.getcwd(),npmignore_dir_list)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/tests/generation/FileGlobs.py
+++ b/tests/generation/FileGlobs.py
@@ -174,7 +174,7 @@
os.path.join(os.getcwd(), "other_folder"),
os.path.join(os.getcwd(), "sample_data", "data")]
- globs = list(get_npmignore_glob(os.getcwd(),npmignore_dir_list))
+ globs = list(get_npmignore_glob(os.getcwd(), npmignore_dir_list))
returned_files = collect_files(
[os.path.join(os.getcwd(), "**")],
tests/generation/FileGlobs.py
Outdated
os.chdir(os.path.dirname(os.path.realpath(__file__))) | ||
os.chdir("file_globs_npmignore_testfiles") | ||
files = [os.path.join("src", "main.c"), | ||
os.path.join("src", "main.h"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/tests/generation/FileGlobs.py
+++ b/tests/generation/FileGlobs.py
@@ -142,26 +142,26 @@
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir("file_globs_npmignore_testfiles")
files = [os.path.join("src", "main.c"),
- os.path.join("src", "main.h"),
- os.path.join("src", "lib", "ssl.c"),
- os.path.join("src", "tests", "main.c"),
- os.path.join("src", "abc.py"),
- os.path.join("src", "upload.c"),
- os.path.join("other_folder", "new_file.c"),
- os.path.join("sample_data", "data", "new_script.js"),
- os.path.join("sample_data", "example.py"),
- ".coafile"]
+ os.path.join("src", "main.h"),
+ os.path.join("src", "lib", "ssl.c"),
+ os.path.join("src", "tests", "main.c"),
+ os.path.join("src", "abc.py"),
+ os.path.join("src", "upload.c"),
+ os.path.join("other_folder", "new_file.c"),
+ os.path.join("sample_data", "data", "new_script.js"),
+ os.path.join("sample_data", "example.py"),
+ ".coafile"]
ignored_files = [os.path.join("build", "main.c"),
- os.path.join("tests", "run.c"),
- os.path.join("src", "build", "main.c"),
- "ignore.c",
- os.path.join("src", "ignore.c"),
- "glob2.py",
- "upload.c",
- os.path.join("src", "abc.pyc"),
- os.path.join("other_folder","test.html"),
- os.path.join("sample_data","data","test.css"),
- "run.pyc"]
+ os.path.join("tests", "run.c"),
+ os.path.join("src", "build", "main.c"),
+ "ignore.c",
+ os.path.join("src", "ignore.c"),
+ "glob2.py",
+ "upload.c",
+ os.path.join("src", "abc.pyc"),
+ os.path.join("other_folder", "test.html"),
+ os.path.join("sample_data", "data", "test.css"),
+ "run.pyc"]
for file in files + ignored_files:
os.makedirs(os.path.dirname(os.path.abspath(file)), exist_ok=True)
02b878f
to
7252f06
Compare
tests/generation/FileGlobs.py
Outdated
open(file, "w").close() | ||
files += [".gitignore"] | ||
files += [os.path.join("other_folder", ".npmignore")] | ||
files += [os.path.join("sample_data", "data", ".npmignore")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/tests/generation/FileGlobs.py
+++ b/tests/generation/FileGlobs.py
@@ -171,7 +171,7 @@
open(file, "w").close()
files += [".gitignore"]
files += [os.path.join("other_folder", ".npmignore")]
- files += [os.path.join("sample_data", "data", ".npmignore")]
+ files += [os.path.join("sample_data", "data", ".npmignore")]
gitignore_dir_list = [os.path.join(os.getcwd())]
npmignore_dir_list = [os.path.join(os.getcwd(), "other_folder"),
tests/generation/FileGlobs.py
Outdated
open(file, "w").close() | ||
files += [".gitignore"] | ||
files += [os.path.join("other_folder", ".npmignore")] | ||
files += [os.path.join("sample_data", "data", ".npmignore")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains following spacing inconsistencies:
- Trailing whitespaces.
SpaceConsistencyBear, severity NORMAL, section python
.
The issue can be fixed by applying the following patch:
--- a/tests/generation/FileGlobs.py
+++ b/tests/generation/FileGlobs.py
@@ -171,7 +171,7 @@
open(file, "w").close()
files += [".gitignore"]
files += [os.path.join("other_folder", ".npmignore")]
- files += [os.path.join("sample_data", "data", ".npmignore")]
+ files += [os.path.join("sample_data", "data", ".npmignore")]
gitignore_dir_list = [os.path.join(os.getcwd())]
npmignore_dir_list = [os.path.join(os.getcwd(), "other_folder"),
fe9fd56
to
b41c6c4
Compare
b41c6c4
to
92532e8
Compare
tests/generation/FileGlobs.py
Outdated
files += [os.path.join("other_folder", ".npmignore")] | ||
files += [os.path.join("sample_data", "data", ".npmignore")] | ||
|
||
gitignore_dir_list = [os.path.join(os.getcwd())] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains unused source code.
PyUnusedCodeBear, severity NORMAL, section python
.
The issue can be fixed by applying the following patch:
--- a/tests/generation/FileGlobs.py
+++ b/tests/generation/FileGlobs.py
@@ -173,7 +173,7 @@
files += [os.path.join("other_folder", ".npmignore")]
files += [os.path.join("sample_data", "data", ".npmignore")]
- gitignore_dir_list = [os.path.join(os.getcwd())]
+ [os.path.join(os.getcwd())]
npmignore_dir_list = [os.path.join(os.getcwd(), "other_folder"),
os.path.join(os.getcwd(), "sample_data", "data")]
569e7ab
to
e9ecc9a
Compare
tests/generation/FileGlobs.py
Outdated
for file in files + ignored_files: | ||
os.makedirs(os.path.dirname(os.path.abspath(file)), exist_ok=True) | ||
open(file, "w").close() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line contains following spacing inconsistencies:
- Trailing whitespaces.
SpaceConsistencyBear, severity NORMAL, section python
.
The issue can be fixed by applying the following patch:
--- a/tests/generation/FileGlobs.py
+++ b/tests/generation/FileGlobs.py
@@ -168,7 +168,7 @@
for file in files + ignored_files:
os.makedirs(os.path.dirname(os.path.abspath(file)), exist_ok=True)
open(file, "w").close()
-
+
files += [os.path.join("other_folder", ".npmignore")]
files += [os.path.join("sample_data", "data", ".npmignore")]
tests/generation/FileGlobs.py
Outdated
for file in files + ignored_files: | ||
os.makedirs(os.path.dirname(os.path.abspath(file)), exist_ok=True) | ||
open(file, "w").close() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W293 blank line contains whitespace'
PycodestyleBear (W293), severity NORMAL, section autopep8
.
tests/generation/FileGlobs.py
Outdated
for file in files + ignored_files: | ||
os.makedirs(os.path.dirname(os.path.abspath(file)), exist_ok=True) | ||
open(file, "w").close() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/tests/generation/FileGlobs.py
+++ b/tests/generation/FileGlobs.py
@@ -168,7 +168,7 @@
for file in files + ignored_files:
os.makedirs(os.path.dirname(os.path.abspath(file)), exist_ok=True)
open(file, "w").close()
-
+
files += [os.path.join("other_folder", ".npmignore")]
files += [os.path.join("sample_data", "data", ".npmignore")]
9236101
to
ac83598
Compare
|
||
globs = get_npmignore_glob(project_dir, npmignore_dir_list) | ||
for glob in globs: | ||
ignore_globs += glob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/coala_quickstart/generation/FileGlobs.py
+++ b/coala_quickstart/generation/FileGlobs.py
@@ -45,7 +45,7 @@
globs = get_npmignore_glob(project_dir, npmignore_dir_list)
for glob in globs:
- ignore_globs += glob
+ ignore_globs += glob
if non_interactive and not ignore_globs:
ignore_globs = []
ac83598
to
e71d438
Compare
|
||
globs = get_npmignore_glob(project_dir, npmignore_dir_list) | ||
for glob in globs: | ||
ignore_globs += glob |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not comply to PEP8.
PEP8Bear, severity NORMAL, section autopep8
.
The issue can be fixed by applying the following patch:
--- a/coala_quickstart/generation/FileGlobs.py
+++ b/coala_quickstart/generation/FileGlobs.py
@@ -45,7 +45,7 @@
globs = get_npmignore_glob(project_dir, npmignore_dir_list)
for glob in globs:
- ignore_globs += glob
+ ignore_globs += glob
if non_interactive and not ignore_globs:
ignore_globs = []
9cd63ea
to
f1b6ed5
Compare
Looks for .npmignore in dirs and subdirs recursively and extract file globs Closes coala#109
f1b6ed5
to
0ee49ab
Compare
Looks for .npmignore in dirs and subdirs recursively
and extract file globs
Closes #109