All Projects → pq → surveyor

pq / surveyor

Licence: Apache-2.0 license
📐 Tools for surveying Dart packages

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to surveyor

mylib
Шаблон кросплатформенного CMake-проекта для языка C++ 🇬🇧 Modern CMake crossplatform project template for C++
Stars: ✭ 49 (+22.5%)
Mutual labels:  static-analysis
cfsec
Static analysis for CloudFormation templates to identify common misconfiguration
Stars: ✭ 53 (+32.5%)
Mutual labels:  static-analysis
IDA Wrapper
An IDA_Wrapper for linux, shipped with an Function Identifier. It works well with Driller on static linked binaries.
Stars: ✭ 14 (-65%)
Mutual labels:  static-analysis
Flogs
An Advanced Logging Framework develop in flutter that provides quick & simple logging solution.
Stars: ✭ 158 (+295%)
Mutual labels:  dart-package
nakedret
nakedret is a Go static analysis tool to find naked returns in functions greater than a specified function length.
Stars: ✭ 82 (+105%)
Mutual labels:  static-analysis
Static-Malware-Analyses
A open source Python script to perform static analysis on a Malware Binary File (portable executable).
Stars: ✭ 15 (-62.5%)
Mutual labels:  static-analysis
mab
Style-preserving Lua parser in Rust
Stars: ✭ 14 (-65%)
Mutual labels:  static-analysis
staticcheck-action
Staticcheck's official GitHub Action
Stars: ✭ 47 (+17.5%)
Mutual labels:  static-analysis
eba
EBA is a static bug finder for C.
Stars: ✭ 14 (-65%)
Mutual labels:  static-analysis
codacy-analysis-cli-action
GitHub Action for the codacy-analysis-cli
Stars: ✭ 42 (+5%)
Mutual labels:  static-analysis
vscode-checkstyle
Haxe Checkstyle extension for Visual Studio Code
Stars: ✭ 24 (-40%)
Mutual labels:  static-analysis
custom-bytecode-analyzer
Java bytecode analyzer customizable via JSON rules
Stars: ✭ 66 (+65%)
Mutual labels:  static-analysis
analysis-model
A library to read static analysis reports into a Java object model
Stars: ✭ 74 (+85%)
Mutual labels:  static-analysis
identypo
identypo is a Go static analysis tool to find typos in identifiers (functions, function calls, variables, constants, type declarations, packages, labels).
Stars: ✭ 26 (-35%)
Mutual labels:  static-analysis
snap
Snap Programming Language
Stars: ✭ 20 (-50%)
Mutual labels:  static-analysis
woocommerce-stubs
WooCommerce function and class declaration stubs for static analysis.
Stars: ✭ 49 (+22.5%)
Mutual labels:  static-analysis
vscode-tenkawa-php
Visual Studio Code extension integrating Tenkawa PHP language server.
Stars: ✭ 28 (-30%)
Mutual labels:  static-analysis
vim-mypy
Vim plugin for executing Python's optional static type checker MyPy (http://mypy-lang.org/)
Stars: ✭ 89 (+122.5%)
Mutual labels:  static-analysis
sonarqube-action
Integrate SonarQube scanner to GitHub Actions
Stars: ✭ 90 (+125%)
Mutual labels:  static-analysis
phan-taint-check-plugin
Github mirror of "mediawiki/tools/phan/SecurityCheckPlugin" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)
Stars: ✭ 21 (-47.5%)
Mutual labels:  static-analysis

📐 surveyor

Tools for surveying Dart packages.

Build Status

Disclaimer: This is not an officially supported Google product.

Installing

These tools are best run from source. To get the sources, clone the surveyor repo like this:

$ git clone https://github.com/pq/surveyor.git

From there you can run the examples.

Examples

Surveying API Use

dart run example/api_surveyor.dart <path_to_project>

will analyze projects at the given path and identify uses of a few specific APIs.

Surveying async Identifier Use

dart run example/async_surveyor.dart <path_to_project>

will analyze projects at the given path and identify places where "async" is used as a simple identifer. These places would produce errors if async become a reserved keyword.

Note that this generates a lot of output. To make sure none of it is lost, consider redirecting to a file. For example:

dart run example/async_surveyor.dart  <path>  2>&1 | tee survey_out.txt

Surveying Errors

dart run example/error_surveyor.dart <path_to_project>

will analyze projects at the given path, filtering for errors.

Surveying Lint Rule Violations

dart run example/lint_surveyor.dart <path_to_project>

will analyze projects at the given path and identify violations of lint rules (custom rules or ones defined by package:linter).

Surveying API Doc Scoring

dart run example/doc_surveyor/lib/main.dart <path_to_project>

will analyze the project at the given path flagging public members that are missing API docs.

A sample run produces output like this:

122 public members
Members without docs:
Void • <path-to-provider-repo>/packages/provider/lib/src/proxy_provider.dart • 107:1
NumericProxyProvider • <path-to-provider-repo>/packages/provider/lib/src/proxy_provider.dart • 177:1
Score: 0.98

Surveying Widget Use

dart run example/widget_surveyor/lib/widget_surveyor.dart <path_to_project>

will analyze the project at the given path and present a list of found Widget child-parent 2-Grams.

A sample run produces a csv file with contents like this:

AppBar -> Text, 1
Center -> Column, 1
Column -> Text, 3
FloatingActionButton -> Icon, 1
MaterialApp -> MyHomePage, 1
Scaffold -> AppBar, 1
Scaffold -> Center, 1
Scaffold -> FloatingActionButton, 1
null -> MaterialApp, 1
null -> MyApp, 1
null -> Scaffold, 1

(Note that by default package dependencies will only be installed if a .packages file is absent from the project under analysis. If you want to make sure package dependencies are (re)installed, run with the --force-install option.)

Related Work

See also package:pub_crawl, which can be used to fetch package sources for analysis from pub.

Features and bugs

This is very much a work in progress. Please file feature requests, bugs and any feedback in the issue tracker.

Thanks!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].