codeql-coding-standards
PHP Code Sniffer
codeql-coding-standards | PHP Code Sniffer | |
---|---|---|
3 | 47 | |
107 | 10,604 | |
3.7% | 0.1% | |
9.8 | 6.8 | |
4 days ago | about 1 month ago | |
CodeQL | PHP | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
codeql-coding-standards
- Misra C++:2023 Published
-
Porsche Open Source Platform
This comment chain appears to have a fundamental misconception of what constitutes safe and what does not.
Automotive standards and automotive coding standards approach safety in a different way than most people think (and given your comments I would say this includes you). If you're curious, you can have a look at some rules to evaluate automotive code that are published here: https://github.com/github/codeql-coding-standards
In short, the rules do not aim to eliminate failure or crashes, but rather make the crash predictable and uniform when a crash occurs so that it can be dealt with. This is further complicated by where and how the automotive manufacture chooses to implement safety controls. It is entirely possible to have a bunch of unsafe code running somewhere on a car, and simply have a small safety shim around said code that prevents the unsafe code from impacting the safe operation of the vehicle.
With that in mind, let's take the example that you use here of emissions cheating software. Emissions is likely not considered safety relevant (it might not even be QM, it just might be some code) and so no safety requirement applies to it. So, no real scrutiny would happen there regardless, at least from a safety perspective. See, validating that software passes a particular safety certification is time and money intensive and manufacturers therefore keep the amount of code that they qualify as safe to a minimum. This means as an example that the infotainment systems of many manufacturers are not safety relevant and no safety function should exist on or interact with them.
A few other things to consider from other threads:
- Telsa doesn't necessarily follow or adhere to safety standards. They (Telsa) are explicitly non-compliant in some cases, and this is partially why there are investigations into their practices.
- Industrial robotics code is just as bad if not worse than most automotive software from what I've seen. As you note, its that these robots are not under manual control
- None of this prevents the software from being open source. There are plenty of safety qualified open source projects. This simply limits who can contribute and how contributions are managed. The main reason why many things in automotive are not open source is that the ECU manufacturer isn't interested in doing so, and the Tier 1/2/3 that does the implementation is even less so.
- CodeQL support for Autosar and Cert C++
PHP Code Sniffer
- The Future of PHP_CodeSniffer
-
Laravel code-quality tools
PHP Insights supports sniffs from PHP CodeSniffer and fixers from PHP CS Fixer. This allows you to add any sniff or fixer as long as it implements PHP_CodeSniffer\Sniffs\Sniff or PhpCsFixer\Fixer\FixerInterface.
-
PHP_CodeSniffer update (package name will NOT be changing... just the repo & ownership)
I don’t know why but that link keeps reloading the page over and over. This one works for me: https://github.com/squizlabs/PHP_CodeSniffer/issues/3932
- The Future of PHP CodeSniffer
-
Top 6 PHP code quality tools 2023
PHP_CodeSniffer is a widely-used tool for enforcing coding standards in PHP. It checks the code against a set of predefined coding standards (such as PSR-12, PSR-2, and many others) and provides reports with violations and recommendations for improvement. Documentation: You can find more information about PHP_CodeSniffer and its usage in the official documentation: PHP_CodeSniffer Repository
-
PHP in 2023 - stitcher.io
While you're at it, also include code-style checkers like phpcs, phpmd and/or php-cs-fixer
-
how can I know if I am following PSR standards
See https://github.com/squizlabs/PHP_CodeSniffer
-
change versions
If you are well-versed in programming then you might wanna take a look at PHPCompatibility. It will scan your codebase at different PHP version rulesets to point out code that needs upgrading. You will be needing PHPCS for this.
-
Your experience switching from vanilla PHP spaghetti/OOP to Symfony?
PHP code sniffer
What are some alternatives?
codeql - CodeQL: the libraries and queries that power security researchers around the world, as well as code scanning in GitHub Advanced Security
PHP CS Fixer - A tool to automatically fix PHP Coding Standards issues
codeql-action - Actions for running CodeQL analysis
PHPStan - PHP Static Analysis Tool - discover bugs in your code without running it!
codeql - CodeQL workshops for GitHub Universe
PHP Mess Detector - PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.
cscs - A curated list of Coding Style Conventions and Standards.
phan - Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
composer-installer - Composer installer for PHP_CodeSniffer coding standards
Rector - Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
GrumPHP - A PHP code-quality tool
Psalm - A static analysis tool for finding errors in PHP applications