diff --git a/.github/contributing.md b/.github/contributing.md new file mode 100644 index 00000000..f6f816d5 --- /dev/null +++ b/.github/contributing.md @@ -0,0 +1,18 @@ +# Contributing to theHarvester Project +Welcome to theHarvester project, so you would like to contribute. + +The following below must be met to get accepted. + +# CI +Make sure all CI passes and you do not introduce any alerts from lgtm. + +# Unit Tests +For new modules a unit test for that module is required and we use pytest. + +# Coding Standards +* No single letter variables and variable names must represent the action that it is performing +* Have static typing on functions etc + +# Submitting Bugs +If you have a bug in a module that you want to submit an issue for and know how to write python code. +Please create a unit test for that bug and submit a fix for it \ No newline at end of file diff --git a/.github/workflows/theHarvester.yml b/.github/workflows/theHarvester.yml index 12dda69e..9af33891 100644 --- a/.github/workflows/theHarvester.yml +++ b/.github/workflows/theHarvester.yml @@ -38,3 +38,6 @@ jobs: - name: Test with pytest run: | pytest + - name: Check static type checking with mypy + run: | + mypy *.py \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 991e69f2..26a2c608 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ script: - python theHarvester.py -d metasploit.com -b baidu,bing,censys,crtsh,dnsdumpster,dogpile,duckduckgo,exalead,linkedin,netcraft,threatcrowd,trello,twitter,virustotal,yahoo - pytest - flake8 . --count --show-source --statistics +- mypy *.py notifications: email: false slack: diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 00000000..0cc1b62c --- /dev/null +++ b/mypy.ini @@ -0,0 +1,3 @@ +[mypy] +ignore_missing_imports = True +show_traceback = True \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 1d6e1eed..73b56ebd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ beautifulsoup4==4.8.0 censys==0.0.8 flake8==3.7.8 grequests==0.4.0 +mypy==0.720 plotly==4.1.1 pytest==5.1.2 PyYaml==5.1.2