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