-
Sempre revisar os próprios PRs antes de disponibilizar para a equipe
Muitos dos erros e arquivos versionados por engano podem ser corrigidos antes. -
Sempre dar nomes bem escritos aos PRs que expliquem o que está sendo mudado
Não use o nome da branch ❌, e escreva frases que façam sentido se lidas sem contexto.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package testsingo | |
import ( | |
"encoding/json" | |
"io" | |
"net/http" | |
) | |
func ReturnTrue() bool { | |
return true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run: | |
tests: true | |
timeout: 2m | |
issues-exit-code: 1 | |
skip-dirs-use-default: true | |
modules-download-mode: readonly | |
output: | |
print-linter-name: true | |
print-issued-lines: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const server = express(); | |
server.use(bodyParser.json()); | |
server.use(bodyParser.text({ | |
type: req => req.headers['content-type'] !== 'application/json', | |
})); | |
server.head('/**', logRequest); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
COVERAGE_REPORT=/tmp/coverage.out | |
TMP_COVIGNORE=/tmp/.covignore | |
function parse_exclusions { | |
echo -e "\nRunning exclusions for file $1..." | |
echo -e "$(cat $1)\n" > $TMP_COVIGNORE | |
while read LINE; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package config | |
import ( | |
"reflect" | |
"strings" | |
"github.com/gin-gonic/gin/binding" | |
v9 "gopkg.in/go-playground/validator.v9" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.collections4.ListUtils; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Optional; | |
import java.util.stream.Collectors; | |
public class SandboxApplication { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
echo "ERROR: Please provide a port as a parameter" | |
else | |
PID="$(lsof -t -i :$1)" | |
if [ -n "$PID" ] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
PS1='\[\033[01;33m\]\u\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\] ' | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' | |
alias ll='ls -GFhla' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\] ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ ' | |
fi |