Gulshan Singh
060106b1e6
Switch from `black` to `ruff format` in lint script ( #2130 )
...
* Update ruff version
* Switch from black to ruff format
* Reformat with ruff format
* Remove dependency on black
2 years ago
Divyansh Singh
a75b150242
show `mypy` errors inline on PRs ( #2075 )
...
show mypy errors inline on PRs
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
Co-authored-by: Gulshan Singh <gsingh2011@gmail.com>
2 years ago
Gulshan Singh
da817b2378
Install dev dependencies with poetry ( #2065 )
...
* Add dev dependencies to pyproject.toml
* Add poetry.toml file
* Remove dev-requirements and install dev dependencies with poetry
* Update pwndbg.nix
2 years ago
Gulshan Singh
45665e823c
Make ruff output in github format if running on CI ( #2070 )
2 years ago
Gulshan Singh
3e855ad220
Allow fixing ruff errors in lint.sh ( #2047 )
2 years ago
Gulshan Singh
5ab3ed0888
Update dev requirements ( #2046 )
...
* Update dev-requirements
* Reformat after black upgrade
* Update ruff configuration after version upgrade
* Fix new ruff errors
2 years ago
Gulshan Singh
4191ceb5ec
Fix lint.sh ( #2030 )
2 years ago
Gulshan Singh
c26832243c
Don't lint .venv files ( #2028 )
2 years ago
disconnect3d
03327ff510
lint.sh: use tools from .venv
2 years ago
Disconnect3d
9e9f328ccc
Update code to Python >= 3.8 ( #1840 )
...
* isort: import __future__ annotations & pyupgrade to 3.8
* dev-requirements.txt: update vermin to 1.5.2 & dont use --quiet
* pyupgrade 3.8 fixes
* fixes
* update vermin to 3.8-
2 years ago
Gulshan Singh
487afacc7a
Switch from flake8 to ruff ( #1696 )
3 years ago
Disconnect3d
afa96abfa0
lint.sh: vermin -vvv instead of -vvvv ( #1556 )
...
My previous commit to this had a typo and used -vvvv instead of -vvv.
The -vvvv is imho a little bit too verbose and we should rather use -vvv only.
3 years ago
Disconnect3d
945f12a267
lint.sh vermin: use -vvv --no-tips
...
Adds `-vvvv --no-tips` to vermin invocation, so on CI instaed of seeing:
```
+ vermin -q -t=3.6 --violations ./pwndbg/
!2 , 3.10 /home/runner/work/pwndbg/pwndbg/pwndbg/disasm/__init__.py
union types as `X | Y` require !2 , 3.10
```
We will now see:
```
+ vermin -vvv --no-tips -q -t=3.6 --violations ./pwndbg/
!2 , 3.10 ./pwndbg/
Detecting python files..
Analyzing using 16 processes..
!2 , 3.10 /home/runner/work/pwndbg/pwndbg/pwndbg/disasm/__init__.py
L227: union types as `X | Y` require !2 , 3.10
Minimum required versions: 3.10
Incompatible versions: 2
Target versions not met: 3.6
```
3 years ago
Gulshan Singh
bc59a8eddd
Fix memoize type issues and enable mypy in lint script ( #1518 )
...
* memoize type fixes
* Add mypy to lint script
* Add mypy to dev-requirements.txt
3 years ago
Gulshan Singh
ac5a6ebe64
Minor lint and pre-hook changes ( #1349 )
3 years ago
Gulshan Singh
7efaa33b0c
Install shfmt on Ubuntu 22.04, otherwise skip running linter ( #1323 )
3 years ago
Gulshan Singh
bb3a7bfcb5
Add quiet flag to vermin
3 years ago
Gulshan Singh
85f4373737
Try to install missing lint dependencies
3 years ago
Filip Mazur
e3c2b87239
Implementing vermin into CI ( #1319 )
3 years ago
Disconnect3d
c74a551a6d
lint.sh: lint only pwndbg files ( #1312 )
3 years ago
Gulshan Singh
6af4753d8e
Add support for formatting the code directly from lint.sh ( #1140 )
3 years ago
Gulshan Singh
544ea0eab7
Linting/formatting improvements ( #1138 )
...
* Fix flake8 F403 warnings
* Fix more flake8 errors and warnings
* Run isort on the root directory
3 years ago
Disconnect3d
b7ddf3a070
fix #1111 errno command edge case ( #1126 )
...
* fix #1111 errno command edge case
This commit fixes the case when errno command causes a binary to
segfault when the `__errno_location` symbol was defined but its .plt.got
entry was not filled yet by the dynamic loader (ld.so), so e.g. when the
glibc library was not loaded yet.
In such a case, us triggering a call to `__errno_location` function
triggered a jump to an unmapped address. Now, we dereference that
.plt.got symbol and see if it lives in mapped memory.
* add tip about errno command
* errno: fix case when __errno_location@got.plt is missing
* fix lint
* fix sh lint
* fix errno test
3 years ago
Gulshan Singh
cc50024417
Format shell scripts with shfmt ( #1123 )
...
* Add lint.sh script
* Format shell scripts with shfmt and add to lint.sh
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
3 years ago
Gulshan Singh
bbf1397a2b
Add lint.sh script ( #1122 )
3 years ago