anthropics/OpenROAD-flow-scripts
Code Volume Analysis scope, overview of main, test, generated, deployment, build, and other code. |
Source Code Analysis Scope
Files includes and excluded from analyses
scoping details...
- 29 extensions are included in analyses: v, sv, tcl, py, json, mk, md, sh, yml, rb, cfg, sp, svh, gitignore, txt, yaml, scala, in, patch, toml, dockerignore, svg, sbt, bzl, nix, gitmodules, gitattributes, builder, properties
- 6 criteria are used to exclude files from analysis:
- exclude files with path like ".*/docs/.*" (Documentation) (35 files).
- exclude files with path like ".*/[Vv]endors?/.*" (Dependencies) (20 files).
- exclude files with path like ".*/_sokrates/.*" (Sokrates files) (0 files).
- exclude files with path like ".*/_sokrates_landscape/.*" (Sokrates landscape files) (0 files).
- exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
- exclude files with path like ".*/sokrates_.*?[.]json" (Sokrates conventions and configurations) (0 files).
- The source code folder contains 2,743 files:
- 1,201 files are included in analyses.
- 1,542 files are excluded from analyses:
- In addition, 34 symbolic links were not followed (nothing behind them is included above).
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
scope details...
- The following criteria are used to filter files:
- files with paths like ".*".
- 811 files match defined criteria (162,614 LOC, 100.0% vs. main code):
- 231 sv files (76,817 LOC)
- 299 v files (67,737 LOC)
- 89 py files (7,925 LOC)
- 147 tcl files (5,731 LOC)
- 10 yaml files (1,857 LOC)
- 11 svh files (1,710 LOC)
- 8 rb files (516 LOC)
- 10 cfg files (239 LOC)
- 1 nix files (42 LOC)
- 2 toml files (28 LOC)
- 3 in files (12 LOC)
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
scope details...
- The following criteria are used to filter files:
- files with paths like ".*/[Tt]est/.*".
- files with paths like ".*_test[.].*".
- files with paths like ".*/test_.*".
- files with paths like ".*[-]test[-].*".
- files with paths like ".*/mock[^/]*/.*".
- 78 files match defined criteria (4,656 LOC, 2.9% vs. main code):
- 41 py files (3,099 LOC)
- 5 scala files (609 LOC)
- 6 rb files (284 LOC)
- 10 sh files (222 LOC)
- 2 v files (123 LOC)
- 4 cfg files (92 LOC)
- 2 tcl files (56 LOC)
- 1 yaml files (53 LOC)
- 1 sbt files (52 LOC)
- 3 mk files (47 LOC)
- 3 gitignore files (19 LOC)
Build and Deployment Code
Source code used to configure or support build and deployment process.
scope details...
- The following criteria are used to filter files:
- files with paths like ".*[.]sh".
- files with paths like ".*/requirements[a-zA-Z0-9._-]*[.]txt".
- files with paths like ".*/pyproject[.]toml".
- files with paths like ".*[.]git[a-z]+".
- files with paths like ".*/[.]gitignore".
- files with paths like ".*/docker[-]compose[.]yml".
- files with paths like ".*/[.]dockerignore".
- files with paths like "(.*/)?[.]dockerignore".
- files with paths like ".*/Dockerfile[.][a-zA-Z0-9._-]+".
- files with paths like ".*/[.]gitmodules".
- files with paths like ".*/[.]github/workflows/.*[.]ya?ml".
- files with paths like ".*/[.]gitattributes".
- files with paths like ".*[.]mk".
- files with paths like ".*[.]bzl".
- files with paths like ".*[.]sbt".
- 149 files match defined criteria (6,056 LOC, 3.7% vs. main code):
- 90 mk files (2,985 LOC)
- 28 sh files (2,036 LOC)
- 16 yaml files (707 LOC)
- 8 gitignore files (118 LOC)
- 1 bzl files (86 LOC)
- 1 builder files (55 LOC)
- 2 dockerignore files (31 LOC)
- 1 toml files (26 LOC)
- 1 gitmodules files (9 LOC)
- 1 gitattributes files (3 LOC)
Other Code
scope details...
- The following criteria are used to filter files:
- files with paths like ".*[.]md".
- files with paths like ".*/README[.][a-z0-9]+".
- files with paths like ".*[.]txt".
- files with paths like ".*[.]json".
- files with paths like ".*[.]patch".
- files with paths like ".*/vendor/.*".
- files with paths like ".*[.]properties".
- 163 files match defined criteria (15,018 LOC, 9.2% vs. main code):
- 108 json files (11,095 LOC)
- 6 txt files (2,432 LOC)
- 45 md files (1,113 LOC)
- 3 patch files (377 LOC)
- 1 properties files (1 LOC)
About This Analysis
learn more about scopes (main, test, generated, build, other)...
- The main category contains all manually created source code files that are being used in the production.
- Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
- Test source code files are used only for testing of the product. These files are normally not deployed to production.
- Build and deployment source code files are used to configure or support build and deployment process.
- Generated source code files are automatically generated files that have not been manually changed after generation.
- While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
- Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.
learn more about used code analyzers...
- *.sv files are analyzed with DefaultLanguageAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
- No unit size analysis
- No conditional complexity analysis
- No dependency analysis
- *.v files are analyzed with GoLangAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
- Unit size analysis
- Conditional complexity analysis
- Basic heuristic dependency analysis
- *.py files are analyzed with PythonAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
- Unit size analysis
- Conditional complexity analysis
- Basic heuristic dependency analysis
- *.tcl files are analyzed with DefaultLanguageAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
- No unit size analysis
- No conditional complexity analysis
- No dependency analysis
- *.yaml files are analyzed with YamlAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
- No unit size analysis
- No conditional complexity analysis
- No dependency analysis
- *.svh files are analyzed with DefaultLanguageAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
- No unit size analysis
- No conditional complexity analysis
- No dependency analysis
- *.rb files are analyzed with RubyAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
- No unit size analysis
- No conditional complexity analysis
- Basic heuristic dependency analysis
- *.cfg files are analyzed with CfgAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
- No unit size analysis
- No conditional complexity analysis
- No dependency analysis
- *.nix files are analyzed with DefaultLanguageAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
- No unit size analysis
- No conditional complexity analysis
- No dependency analysis
- *.toml files are analyzed with DefaultLanguageAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
- No unit size analysis
- No conditional complexity analysis
- No dependency analysis
- *.in files are analyzed with RustAnalyzer:
- All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
- Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
- Unit size analysis
- Conditional complexity analysis
- No dependency analysis