Skip to content

Commit 0823cb6

Browse files
cclauss0xInfection
authored andcommitted
Travis CI: Add automated testing for syntax errors and undefined names (0xInfection#40)
* Travis CI: Add automated testing for syntax errors and undefined names Replaces 0xInfection#39. You would need to log into https://travis-ci.com with your GitHub credentials and go for the free plan. * Added --exclude=./lib - lib/ is for third party modules * Fixed the build error due to stupid code :/ **Phew""
1 parent d06f9a7 commit 0823cb6

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
group: travis_latest
2+
language: python
3+
cache: pip
4+
matrix:
5+
allow_failures:
6+
- python: 3.7
7+
include:
8+
- python: 2.7
9+
#- python: 3.4
10+
#- python: 3.5
11+
#- python: 3.6
12+
- python: 3.7
13+
dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069)
14+
sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069)
15+
install:
16+
# - pip install -r requirements.txt
17+
- pip install flake8
18+
before_script:
19+
# stop the build if there are Python syntax errors or undefined names
20+
- flake8 . --count --exclude=./lib --select=E901,E999,F821,F822,F823 --show-source --statistics
21+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
22+
- flake8 . --count --exclude=./lib --exit-zero --max-complexity=10 --max-line-length=127 --statistics
23+
script:
24+
- true # add other tests here
25+
notifications:
26+
on_success: change
27+
on_failure: change # `always` will be the setting once code changes slow down

modules/0x01-OSINT+Footprinting/0x02-ActiveReconnaissance/commentssrc.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,7 @@ def commentssrc(web):
3232
print(GR+' [*] Importing links...')
3333
po = web.split('//')[1]
3434
p = 'tmp/logs/'+po+'-logs/'+po+'-links.lst'
35-
if os.path.exists(po):
36-
with open(po,'r') as ro:
37-
for i in ro:
38-
i = i.replace('\n','')
39-
links.append(i)
40-
else:
41-
print(R+' [-] No files found under '+p+'!')
42-
links = [web]
35+
links = [web]
4336

4437
for w in links:
4538
print(GR+' [*] Making the request...')

0 commit comments

Comments
 (0)