deepsourcecorp / cli Goto Github PK
View Code? Open in Web Editor NEWCommand line interface to DeepSource
Home Page: https://deepsource.com
License: BSD 2-Clause "Simplified" License
Command line interface to DeepSource
Home Page: https://deepsource.com
License: BSD 2-Clause "Simplified" License
? Which languages/tools does your project use? Docker
? Custom Dockerfile paths
X Sorry, your reply was invalid: Value is required
? Would you like to activate any Transformers for any languages? [Use arrows to move, space to select, <right> to all, <left> to none, type to filter, ? for more help]
[ ] RuboCop
[ ] dotnet-format
[ ] Prettier
> [ ] Google Java Format
[ ] Black
[ ] Go fmt
[ ] Gofumpt
Press <CR>
will get X Sorry, your reply was invalid: Value is required
Utility which resolves remote data: https://github.com/deepsourcelabs/cli/blob/master/utils/remote_resolver.go
A --branch
flag can be used to specify the issues for a certain branch. As of now, the issues of the default analysis branch are listed.
.. and hook it up with Travis.
Using curl,
$ curl https://deepsource.io/cli | sh
deepsourcelabs/cli crit platform darwin/arm64 is not supported. Make sure this script is up-to-date and file a request at https://github.com/deepsourcelabs/cli/issues/new
No relevant binaries are present in the Releases, either.
Is your feature request related to a problem? Please describe.
So the script at https://deepsource.io/cli is not really opensourced, that's why reporting this here:
the default location space for linux systems is generally $HOME/.local/bin/
this has an advantage to make the command deepsource
beng invoked from anywhere in the system since the bin location is included in $PATH
by default.
Describe the solution you'd like
Either we export the $HOME/bin
to users $PATH
env or change the default installation location
The CLI is currently released manually. It would be better to release it automatically whenever a tag is pushed, probably using Cloud Build.
The test_setup
recipe in Makefile has a step: cd ${CODE_PATH} && ls -A1 | xargs rm -rf
which can accidently delete some significant directories if CODE_PATH
is not configured.
Run builds and tests on all 3 primary OS: MacOS, Linux based OS(already exists) and Windows.
Current version: 1.1.3
Command completion
introduced in: 1.2.0
This can then be used to generate completions automatically as per the user shell. It can be integrated in Homebrew formulae as well.
Issues should be pushed directly to DeepSource
Currently, no error is reported in case the DSN is wrong. We should add an error here which should point the user to verify the DSN once.
Before sending artifact, we check for the existence of .deepsource.toml in the root of the repository, but the config might be present in the base branch of the pull request.
? Would you like to add any exclude patterns? Yes
? Select exclude pattern
? Add more exclude patterns? Yes
? Select exclude pattern
? Add more exclude patterns? Yes
? Select exclude pattern
? Add more exclude patterns? No
Result:
exclude_patterns = ["", "", ""]
Expected:
? Would you like to add any exclude patterns? Yes
? Select exclude pattern
? exclude pattern shouldn't be empty string
? Select exclude pattern a
? Add more exclude patterns? Yes
? Select exclude pattern a
? exclude pattern shouldn't be repeated
https://github.com/deepsourcelabs/cli/blob/v0.1.7/constants.go#L4
Also can't overwrite it with ldflags because it's a const
https://www.digitalocean.com/community/tutorials/using-ldflags-to-set-version-information-for-go-applications
I guess this is related to #28
Dependabot can't resolve your Go dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
github.com/go-errors/[email protected]: reading github.com/go-errors/errors/go.mod at revision v1.0.1: unknown revision v1.0.1
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Filter issues for specific files and directories specified by the user.
This is a bug about the deepsource core system (not the CLI). I couldn't find the correct repository so I've created the issue here. Please move the issue to the correct repository or point me to the correct repository.
We have deepsource enabled on https://github.com/dgraph-io/badger/ and deepsource is running on our CI. Deepsource complains that the loop variable j
never changes but that's not the case. Here's the line deepsource complains about https://github.com/dgraph-io/badger/blob/be0fe0acd493f0542c90070a5b8ec1ab734d1b44/db_test.go#L2053-L2053
In order to make sure that the CLI authentication works in CI systems where device auth flow can't be used since no browser can be opened, we can add a flag --token
or --with-token
through which the user can pass the value of the generated PAT. The CLI authenticates the user through the passed PAT value.
deepsource status
command can be used to check the status of any VCS branch of a repository if it has any active issues or not. Adding to issues, other data like metrics can be fetched as well.
DeepSource also reports certain metrics like documentation coverage, number of direct/indirect dependencies etc. Listing them alongwith issues might also help.
Filter issues based on the issue categories like bug-risk
, security
, recommended
etc.
Description:
On using spinner.StopSpinnerWithError()
along with a return err
statement, error reporting happens twice:
$ /tmp/deepsource analyzer dry-run --image burntcarrot/doesnotexist
[✗] Failed to pull the Analyzer image. Error: Error response from daemon: pull access denied for burntcarrot/doesnotexist, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
ERROR Failed to run the Analyzer. Error: Error response from daemon: pull access denied for burntcarrot/doesnotexist, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
How to reproduce?
This issue can be reproduced by doing a dry run on an image that doesn't exist, just like:
deepsource analyzer dry-run --image burntcarrot/doesnotexist
Like Travis CI, Github action, by default makes a merge commit and work on top of it.
When the cli sends the test coverage analysis result, it sends a base OID. Here, it is of this merge commit, of which no run is created on DS and the reporting fails.
As of now, goreleaser builds happen sequentially. Running them in parallel would reduce the release time.
We will need a user level auth which returns a token that can be used for future API calls to our services. This token can be stored in a file locally ex: ~/.deepsource/cli_token
.
I like how stripe does this.
$ stripe login
Your pairing code is: eager-foo-amply-bar
This pairing code verifies your authentication with Stripe.
Press Enter to open the browser (^C to quit)
@mohi7solanki Need an endpoint and query structure for the same.
I've set up DeepSource on a private repo on Github. The .deepsource.toml
has been configured and added at the root of the repo. DeepSource reports a few issues on the dashboard. All good.
However, when I try and add code coverage, following the steps to create and pass the cover.out
report with output from my tests, and having double-checked the syntax and file locations, I still get the above error DeepSource | Error | .deepsource.toml not found.
The CI/CD is via Github actions. I'm using Go version 1.13.
Tweak the goreleaser config to support windows binaries builds.
We are using viper
in configvalidator
package for the deepsource config validate
command to read the .deepsource.toml
config which is to be validated.
Viper can be replaced here with other libraries which have a lower size footprint and are focused only on reading TOML files.
Files where viper
is used:
Like wakatime/wakatime-cli#781, why not use https://github.com/hashicorp/vault?
Since we are adding new commands to CLI, the size of the binary is constantly increasing. This reflects in the case when the users pull the CLI binary in their CI systems as the time to pull the binary increases. Thus, creating a separate binary on every release that will be served if the environment is a CI system is the need.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.