13 Commits (forgejo)

Author SHA1 Message Date
Khaled Yakdan dbfc5aa016
Move fuzz tests into tests/fuzz (#22376)
This puts the fuzz tests in the same directory as other tests and eases
the integration in OSS-Fuzz

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 year ago
AdamKorcz 906d8cc5dc
Rewrite fuzzers to native Go harnesses (#22313) 1 year ago
Lunny Xiao 36a2d2f919
Add a simple test for external renderer (#20033)
Fix #16402
1 year ago
flynnnnnnnnnn e81ccc406b
Implement FSFE REUSE for golang files (#21840)
Change all license headers to comply with REUSE specification.

Fix #16132

Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
1 year ago
wxiaoguang c18d8d6968
Remove legacy `+build:` constraint (#19582)
Go 1.17 and later use modern `//go:build` constraints, the old `// +build:` constraints should be removed.
2 years ago
6543 54e9ee37a7
format with gofumpt (#18184)
* gofumpt -w -l .

* gofumpt -w -l -extra .

* Add linter

* manual fix

* change make fmt
2 years ago
zeripath 5cb0c9aa0d
Propagate context and ensure git commands run in request context (#17868)
This PR continues the work in #17125 by progressively ensuring that git
commands run within the request context.

This now means that the if there is a git repo already open in the context it will be used instead of reopening it.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years ago
John Olheiser 648464b504
Add bundle download for repository (#14538)
* Add bundle download

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix build tags

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Download specific commit

Signed-off-by: jolheiser <john.olheiser@gmail.com>
3 years ago
zeripath 5fbccad906
Fix NPE in fuzzer (#16680)
The fuzzer found an issue with the issue pattern processor where there is a spurious
path.Clean which does not need to be there. This PR also sets the default AppURL for
the fuzzer too.

Signed-off-by: Andrew Thornton <art27@cantab.net>
3 years ago
zeripath 1a1ce9b721
Fuzzer finds an NPE due to incorrect URLPrefix (#16249)
The Fuzzer is running on a non-repo urlprefix which is incorrect for RenderRaw

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
3 years ago
6543 bee8ce342f
Fix go-fuzz (#15596)
* Fix go-fuzz

followup of https://github.com/go-gitea/gitea/pull/15175

* simplify

* enhance
3 years ago
AdamKorcz 94415f7517
Added 2 fuzzers (#13818)
* Added fuzzer

Signed-off-by: AdamKorcz <adam@adalogics.com>

* Added better fuzzer names

Signed-off-by: AdamKorcz <adam@adalogics.com>

* Moved fuzzer to /tools

* Update tools/fuzz.go

Co-authored-by: 6543 <6543@obermui.de>

* Update tools/fuzz.go

* Update tools/fuzz.go

Co-authored-by: silverwind <me@silverwind.io>

* Added tools to Makefile

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
silverwind e1535c74cc
Add 'make watch' (#12636)
* Add 'make watch'

This combines frontend and backend watch into a single command that runs
them in parallel on on SIGINT terminates both.

Termination is not super-clean but I guess it does not have to.

* move to tools/, trap more signals, remove gnu-specific flag

* simplify

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago