Skip to content

Commit

Permalink
Small improvements (#167)
Browse files Browse the repository at this point in the history
Small improvements
  • Loading branch information
moul authored Jul 22, 2019
2 parents 6acdab0 + d337910 commit 7296ce2
Show file tree
Hide file tree
Showing 16 changed files with 315 additions and 272 deletions.
63 changes: 63 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
root = true

[*]
charset = utf-8

end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

indent_style = space
indent_size = 4

[Makefile]
indent_style = tab

[*.go]
indent_style = tab

[*.proto]
indent_size = 2

[*.swift]
indent_size = 4

[*.tmpl]
indent_size = 2

[*.js]
indent_size = 2
block_comment_start = /*
block_comment_end = */

[*.html]
indent_size = 2

[*.bat]
end_of_line = crlf

[*.{json,yml}]
indent_size = 2

[.{babelrc,eslintrc}]
indent_size = 2

[{Fastfile,.buckconfig,BUCK}]
indent_size = 2

[*.diff]
indent_size = 1

[*.m]
indent_size = 1
indent_style = space
block_comment_start = /**
block_comment = *
block_comment_end = */

[*.java]
indent_size = 4
indent_style = space
block_comment_start = /**
block_comment = *
block_comment_end = */
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Auto detect text files and perform LF normalization
* text=auto

# Collapse vendored and generated files on GitHub
vendor/* linguist-vendored
*/vendor/* linguist-vendored
*.gen.* linguist-generated
*.pb.go linguist-generated

# Reduce conflicts on markdown files
*.md merge=union
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @moul
29 changes: 29 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
before:
hooks:
- go mod download
builds:
-
goos: [linux, darwin, windows]
goarch: [386, amd64, arm, arm64]
archives:
- wrap_in_directory: true
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brew:
name: depviz
github:
owner: moul
name: homebrew-moul
commit_author:
name: moul-bot
email: "m+bot@42.am"
homepage: https://manfred.life/depviz
description: "Issue dependency visualizer, a.k.a. 'auto-roadmap'."
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at m+coc-report@42.am. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Contributing

When contributing to this repository, you can first discuss the change you wish to make via issue,
email, or any other method with the maintainers of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018 Manfred Touron
Copyright 2018-2019 Manfred Touron

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ update_examples:
.PHONY: docker.build
docker.build:
docker build -t moul/depviz .

.PHONY: release
release:
goreleaser --snapshot --skip-publish --rm-dist
@echo -n "Do you want to release? [y/N] " && read ans && [ $${ans:-N} = y ]
goreleaser --rm-dist
27 changes: 8 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,19 @@

<h3 align="center">👓 Issue dependency visualizer, a.k.a. "auto-roadmap".</h3>

<p align="center">
<a href="https://circleci.com/gh/moul/depviz">
<img src="https://circleci.com/gh/moul/depviz.svg?style=shield"
alt="Build Status">
</a>
<a href="https://goreportcard.com/report/moul.io/depviz">
<img src="https://goreportcard.com/badge/moul.io/depviz"
alt="Go Report Card">
</a>
<a href="https://github.com/moul/depviz/releases">
<img src="https://badge.fury.io/gh/moul%2Fdepviz.svg"
alt="GitHub version">
</a>
<a href="https://godoc.org/moul.io/depviz">
<img src="https://godoc.org/moul.io/depviz?status.svg"
alt="GoDoc">
</a>
</p>

<p align="center"><b>
<a href="https://manfred.life/depviz">Manfred.life</a> •
<a href="https://twitter.com/moul">Twitter</a>
</b></p>

[![CircleCI](https://circleci.com/gh/moul/depviz.svg?style=shield)](https://circleci.com/gh/moul/depviz)
[![GoDoc](https://godoc.org/moul.io/depviz?status.svg)](https://godoc.org/moul.io/depviz)
[![License](https://img.shields.io/github/license/moul/depviz.svg)](https://github.com/moul/depviz/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/moul/depviz.svg)](https://github.com/moul/depviz/releases)
[![Go Report Card](https://goreportcard.com/badge/moul.io/depviz)](https://goreportcard.com/report/moul.io/depviz)
[![Docker Metrics](https://images.microbadger.com/badges/image/moul/depviz.svg)](https://microbadger.com/images/moul/depviz)
[![Made by Manfred Touron](https://img.shields.io/badge/made%20by-Manfred%20Touron-blue.svg?style=flat)](https://manfred.life/)

## Introduction
dependency visualizer (auto roadmap)

Expand Down
9 changes: 9 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Reporting security issues

I take security seriously. If you discover a security issue, please bring it to my attention right away!

### Reporting a Vulnerability

Please **DO NOT** file a public issue, instead send your report privately to m+security-report@42.am.

Security reports are greatly appreciated and I will publicly thank you for it, although I keep your name confidential if you request it.
19 changes: 14 additions & 5 deletions cli/cmd_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,25 @@ func (cmd *dbCommand) dbDumpCommand() *cobra.Command {
}

func dbDump(opts *dbOptions) error {
issues := []*issues.Issue{}
if err := db.Find(&issues).Error; err != nil {
return err
query := db.Model(issues.Issue{}).Order("created_at")
perPage := 100
var allIssues []*issues.Issue
for page := 0; ; page++ {
var newIssues []*issues.Issue
if err := query.Limit(perPage).Offset(perPage * page).Find(&newIssues).Error; err != nil {
return err
}
allIssues = append(allIssues, newIssues...)
if len(newIssues) < perPage {
break
}
}

for _, issue := range issues {
for _, issue := range allIssues {
issue.PostLoad()
}

out, err := json.MarshalIndent(issues, "", " ")
out, err := json.MarshalIndent(allIssues, "", " ")
if err != nil {
return err
}
Expand Down
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
module moul.io/depviz

require (
cloud.google.com/go v0.41.0 // indirect
github.com/awalterschulze/gographviz v0.0.0-20190624143730-fa59802746ab
github.com/brianloveswords/airtable v0.0.0-20180329193050-a39294038dd9
github.com/denisenkom/go-mssqldb v0.0.0-20190522052604-eb9f6a1743f3 // indirect
github.com/denisenkom/go-mssqldb v0.0.0-20190710001350-29e7b2419f38 // indirect
github.com/go-chi/chi v4.0.2+incompatible
github.com/go-chi/docgen v1.0.5
github.com/go-chi/render v1.0.1
github.com/golang/protobuf v1.3.2 // indirect
github.com/google/go-github v17.0.0+incompatible
github.com/google/pprof v0.0.0-20190522052604-54271f7e092f // indirect
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 // indirect
github.com/jinzhu/gorm v1.9.9
github.com/jinzhu/gorm v1.9.10
github.com/lib/pq v1.1.1
github.com/magiconair/properties v1.8.1 // indirect
github.com/mattn/go-sqlite3 v1.10.0
github.com/pelletier/go-toml v1.4.0 // indirect
github.com/pkg/errors v0.8.1
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v0.0.5
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.4.0
github.com/uber-go/atomic v1.4.0 // indirect
github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2 // indirect
github.com/xanzy/go-gitlab v0.18.0
github.com/xanzy/go-gitlab v0.19.0
go.uber.org/ratelimit v0.0.0-20180316092928-c15da0234277 // indirect
go.uber.org/zap v1.10.0
golang.org/x/arch v0.0.0-20190329052859-788fe5ffcd8c // indirect
golang.org/x/net v0.0.0-20190624143730-3b0461eec859 // indirect
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 // indirect
golang.org/x/oauth2 v0.0.0-20190624143730-0f29369cfe45
golang.org/x/sync v0.0.0-20190427212804-112230192c58 // indirect
golang.org/x/sys v0.0.0-20190624143730-c5567b49c5d0 // indirect
google.golang.org/appengine v1.6.1 // indirect
moul.io/zapgorm v0.0.0-20190624143730-7f287f4f74c9
golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542 // indirect
moul.io/zapgorm v0.0.0-20190706070406-8138918b527b
)
Loading

0 comments on commit 7296ce2

Please sign in to comment.