Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-08style: Document camelCasing in test name suffixToon Claes
When a test name suffix consists of multiple words camelCasing should be used to indicate separation of words.
2020-12-04Merge branch 'ps-errors-wrapping' into 'master'Zeger-Jan van de Weg
Use %w to wrap errors See merge request gitlab-org/gitaly!2877
2020-12-04Use %w to wrap errorsPavlo Strokov
Code style document updated to notice on the error wrapping and useful links for reference.
2020-12-03style: use a better alias for "git reference"Ævar Arnfjörð Bjarmason
Since v2.25.0 of git you've been able to use this way of doing it. See git-vcs/git@1f0fc1db85 (pretty: implement 'reference' format, 2019-11-19). So let's use that example, and while I'm at it change the SHA-1 in the example here to the one that landed in the repo, not some pre-rebase version that was only in @pks-t's local repo.
2020-12-01style: Document best practices for commit hygienePatrick Steinhardt
While our style document currently contains mostly advice about code hygiene, commit hygiene is also important for a project to ensure it ends up with understandable commits. It ensures that it is easily possible to dig up the reasoning behind changes in the future, making the project easier to maintain in the long run. This commit thus documents various best practices around commit hygiene.
2020-11-18Merge branch 'pks-style-tests-main' into 'master'Pavlo Strokov
style: Document location of `TestMain()` function See merge request gitlab-org/gitaly!2799
2020-11-17style: Document location of `TestMain()` functionPatrick Steinhardt
While many tests use a `testhelper_test.go` file to implement `TestMain()`, this is not common to all. This makes test setup harder to find than necessary. This commit thus documents the recommended name of "testhelper_test.go" for such code.
2020-11-17style: Document gotchas when using defers with `os.Exit()`Patrick Steinhardt
Using `os.Exit()` will cause the calling process to exit immediately without executing any deferred functions. In the context of our tests, this means that any created ondisk state may not get cleaned up correctly. This commit thus documents those pitfalls in "STYLE.md".
2020-10-29Introduce test name style guide with exampleJames Fargher
2020-07-06Add field name for git.FlagZeger-Jan van de Weg
Go vet, editors, and other tooling will emit warnings when a struct doens't have the fields names, as it falls back on ordering. That could introduce bugs when new fields are added with the same type at the beginning of a struct. To reduce the number of warnings in my editor, I ran a `sed` script to update the code.
2020-06-17STYLE: Clarify when to use pointer or value receiversPatrick Steinhardt
Our current policy with regards to pointer vs. value receivers is not documented anywhere. Given that we have a policy saying that if a single method requires a pointer receiver, all methods should be pointer receivers, there's some non-obvious bits to our coding style. So let's write this part down so we can point to it from now on.
2020-05-07STYLE.md: Define best practices for loggingPatrick Steinhardt
There's currently a lot of different practices sprawling throughout the codebase when it comes to logging, so chances are high you will not use up-to-date best practices when writing new logging code. So let's nail down our logging style so we have a document we can consult and point to.
2020-04-21STYLE: add a note about character sets for codingPatrick Steinhardt
Developer-facing code should use the ASCII character set as far as possible to ensure improve accessibility across platforms. Many platforms lack a lot of UTF8 code glyps, leading to code that is hard to read on such platforms if they are used. Add a note to our style guide that mandates this rule.
2020-03-25Merge branch 'pks-style-ordering' into 'master'Jacob Vosmaer
Add a note on ordering of functions and types See merge request gitlab-org/gitaly!1949
2020-03-24STYLE.md: Add a note on ordering of typesPatrick Steinhardt
Types should be declared before their first. Let's document this in our style guide.
2020-03-23Add style notes about pointer constructors and byte literalsJacob Vosmaer
2020-01-20Goroutine style guidePaul Okstad
2019-12-17Add style guide for Go import declarationsPaul Okstad
2019-10-09Use built-in RPC dummy handlersJacob Vosmaer
2019-09-18Git command DSLPaul Okstad
2019-07-10Refer to prometheus best practices in STYLE.mdJacob Vosmaer
2019-06-27Document outcome of black/white box discussionJacob Vosmaer
2018-04-06Revert "Merge branch 'dont-use-atomic' into 'master'"Jacob Vosmaer (GitLab)
This reverts merge request !653
2018-04-06Don't use sync/atomicJacob Vosmaer (GitLab)
2017-10-09Add style-guide about StubsKim Carlbäcker
2017-08-14Test output cleanup, no naked returnsJacob Vosmaer (GitLab)
2017-08-10Update STYLE.mdAndrew Newdigate
2017-03-21More error style guidelinesJacob Vosmaer
2017-03-10Add style guideJacob Vosmaer