static-analysis Questions

8

What I'd like to do is scan a set of Java classes, and trace all method calls from a specific method of an Abstract Class, and within that context, build a list of all code which performs some oper...
Proofread asked 9/2, 2011 at 22:50

1

Solved

I accidentally used a mutable default argument without knowing it. Is there a linter or tool that can spot this and warn me?
Helotry asked 18/9, 2022 at 18:50

13

Solved

The complexity of methods in most programming languages can be measured in cyclomatic complexity with static source code analyzers. Is there a similar metric for measuring the complexity of a SQL q...
Hulbig asked 28/7, 2010 at 14:2

13

I would very much like to integrate pylint into the build process for my python projects, but I have run into one show-stopper: One of the error types that I find extremely useful--:E1101: *%s %r h...
Nirvana asked 22/9, 2008 at 16:39

3

Solved

Q: How do I resolve this madness between the ireturn and nolintlint linters? Details: I have a Golang function with this signature func NewClientCredentialsTokenSource( issuer string, clientId st...
Hawkweed asked 26/5, 2022 at 0:6

2

Solved

I'm a bit confused by the behavior of Frama-C version 18.0 (Argon). Given the following program: #include <assert.h> #include <limits.h> /*@ requires order: min <= max; assigns ...
Charleycharlie asked 16/5, 2019 at 19:31

7

Solved

The error code D401 for pydocstyle reads: First line should be in imperative mood. I often run into cases where I write a docstring, have this error thrown by my linter, and rewrite it -- but the ...
Greenway asked 24/1, 2020 at 18:48

2

I have searched a lot to find the difference between the Interprocedural and Intraprocedural analysis. As far as I could understand, the Intraprocedural analysis is applied on a single procedure wh...
Theretofore asked 27/5, 2020 at 21:36

3

Solved

I wanted to try out the clang static analyzer. I'm on Windows and built clang with Visual Studio. It seems to work, but at the same time it seems to be extremely useless. I made an example file e...
Oriental asked 9/3, 2017 at 13:32

1

I really like the JSON validator that vscode has. It catches errors that a lot of editors don't, so I really want to use it in my pre commit tests. To do that, I was hoping there was an npm equival...
Arrowworm asked 23/3, 2019 at 16:35

1

I've run SonarQube analysis on my Android/Java project and it resulted, among others, with issues: Sections of code should not be "commented out" If SonarQube is able to identify them, is it p...
Armenta asked 4/12, 2015 at 13:59

2

Solved

Consider the following sample code: # -*- coding: utf-8 -*- """Test module.""" def test(): """Tets function""" return 10 pylint give...
Josephinejosephson asked 27/11, 2014 at 2:51

2

Solved

This is my Ansible task - name: no need to import it. ansible.builtin.uri: url: > https://{{ vertex_region }}-aiplatform.googleapis.com/v1/projects/{{ project }}/locations/{{ vertex_region }}...
Logbook asked 28/3, 2022 at 14:39

2

Solved

Is there a way to immediately see Swift errors in AppCode? On their website they talk about static code analysis, but nowhere could I find a claim that this happens instantly. When you type some Sw...

6

Solved

Is it possible to create a typeclass that can no longer admit new members (perhaps by using module boundaries)? I can refuse to export a function necessary for a complete instance definition, but t...
Sochor asked 25/7, 2013 at 5:41

6

When making changes to YAML-defined Azure DevOps Pipelines, it can be quite tedious to push changes to a branch just to see the build fail with a parsing error (valid YAML, but invalid pipeli...
Roodepoortmaraisburg asked 29/10, 2018 at 8:43

2

I'm trying to write exception safe code. I find that using C++11's noexcept specifier makes this goal a whole lot more achievable. The general idea, of course, is that a function should be marked ...
Bet asked 1/2, 2013 at 17:53

3

I have a makefile project comprised of many source, header and other files, which I am trying to convert to an Eclipse "native" project. The problem that the Indexer reports errors and warning on f...
Assignation asked 8/7, 2015 at 17:51

2

I am trying to exclude all generated files from a package using the following analysis_options.yaml file. include: package:pedantic/analysis_options.yaml analyzer: strong-mode: implicit-casts: f...
Acidulate asked 15/4, 2020 at 9:17

2

Solved

I have the following structure type Groups struct { sync.Mutex Names []string } and the following function func NewGroups(names ...string) (Groups, error) { // ... return groups, nil } Wh...
Banjo asked 15/5, 2016 at 18:19

3

Solved

Is there a way to disable this inspection? I know, this maybe be a bad design, but I still would like to disable it.
Worm asked 3/1, 2019 at 16:56

1

Solved

I have a problem with error text. If I use the error message shown below, the editor's linter gives a warning like this: "error strings should not end with punctuation or a newline": retu...
Alisun asked 15/8, 2021 at 14:56

8

Solved

I'm looking for a nice Stack Overflow-style answer to the first question in the old blog post C++ Code Size, which I'll repeat below: I’d really like some tool (ideally, g++ based) that sho...
Snack asked 24/3, 2010 at 17:2

2

Solved

I'm using golangci-lint and I'm getting an error on the following code: versions []ObjectDescription ... (populate versions) ... for i, v := range versions { res := createWorkerFor(&v) ... ...
Northerner asked 18/6, 2020 at 8:55

6

Solved

PEP8 suggests that: Imports should be grouped in the following order: standard library imports related third party imports local application/library specific imports You should put...
Benzol asked 28/3, 2014 at 20:51

© 2022 - 2024 — McMap. All rights reserved.