Commit Graph

117 Commits

Author SHA1 Message Date
alokkumardalei-wq
8d652ae302 bazel: add buildifier lint/fmt/tidy targets for .bazel files
Implements #9858 (#8495). Adds three new targets mirroring the TCL
lint pattern:

  //:lint_bzl_test  - buildifier -mode=check -lint=warn  (lint check)
  //:fmt_bzl_test   - buildifier -mode=check -lint=off   (format check)
  //:tidy_bzl       - buildifier -mode=fix -lint=fix     (auto-fix)

Wires lint_bzl_test and fmt_bzl_test into //:lint_test, and
bzl_tidy.sh + bzl_lint_test.sh into //:fix_lint. Adds
buildifier_prebuilt 6.4.0 as a dev_dependency in MODULE.bazel.

Uses git ls-files for file discovery, which automatically skips
submodule paths (src/sta, third-party/abc). Explicit -mode=check
flags override the repo-root .buildifier.json default (mode: fix),
ensuring test targets remain read-only.

Updates docs/contrib/LintTargets.md: moves buildifier from "Planned
additions" to "Available targets".

Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-04-14 11:30:47 +05:30
Øyvind Harboe
183689f85d fix: make fix_lint run tclint after tclfmt (POLA)
fix_lint was an alias for tidy_tcl (tclfmt only), so developers
who ran it before pushing were still surprised by tclint CI
failures like line-length.

Replace the alias with a script that delegates to tcl_tidy.sh
and tcl_lint_test.sh (DRY), shows git status, and exits with
a clear error if lint violations remain unfixed.

Update docs with POLA rationale and naming convention for
umbrella and per-language targets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 16:59:23 +01:00
Øyvind Harboe
f9a68f55ea docs: remove redundant tclint settings from docs
The settings are already visible in tclint.toml itself (DRY),
and the listed exclusions were already stale.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-18 23:59:37 +01:00
Øyvind Harboe
89c3c365d6 bazel: use verb-first naming for lint targets
Rename tcl_lint_test → lint_tcl_test, tcl_fmt_test → fmt_tcl_test,
tcl_tidy → tidy_tcl for consistent verb-first naming with _test suffix
per Bazel convention. Update docs to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-13 15:32:58 +01:00
Øyvind Harboe
f5d566698e bazel: address PR #9734 review comments
- Rename //:lint to //:fix_lint to clarify it modifies files (gadfort)
- Replace duplicated sh_binary with alias(actual = ":tcl_tidy") (gemini)
- Add BUILD_WORKSPACE_DIRECTORY fallback in tcl_tidy.sh (gemini)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-13 15:32:58 +01:00
Øyvind Harboe
0267752d4c docs: add lint targets documentation
Document the new Bazel lint targets, usage, configuration, how to
add new linters, and planned additions (clang-tidy, clang-format,
ruff, buildifier, shellcheck, doc checks, duplicate ID checks).

Explain why Bazel is the right tool for managing linter dependencies:
hermetic, version-pinned, reproducible across dev machines and CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-13 15:32:58 +01:00
Matt Liberty
93742072ba Merge pull request #9672 from Pinata-Consulting/fix-example-tool-reference
Fix incorrect example tool directory reference in DeveloperGuide.md
2026-03-06 16:56:07 +00:00
Øyvind Harboe
81fd1db8b6 Update docs/contrib/DeveloperGuide.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-06 16:24:51 +01:00
Matt Liberty
c8bfb092ee Merge pull request #9673 from Pinata-Consulting/fix-deprecated-error-api-ref
Some checks failed
Automatically sync branch from upstream. / Automatic sync 'master' from The-OpenROAD-Project/OpenROAD (push) Has been cancelled
Lint Python / Black (push) Has been cancelled
Lint Bazel / Buildifier format (push) Has been cancelled
Lint Bazel / Buildifier lint (push) Has been cancelled
Check That ODB Files Are Generated / Are-Odb-Files-Generated (push) Has been cancelled
Format Code with pre commit trigger / Clang-Format (push) Has been cancelled
Lint Tcl code / Tclint (push) Has been cancelled
Build on macOS / Mac-Build (push) Has been cancelled
Scan Code with pre commit trigger / Security-Scan (push) Has been cancelled
Update Errors section to reference Logger instead of removed Error.hh
2026-03-06 07:30:18 +00:00
Matt Liberty
22f105f46c Merge pull request #9670 from Pinata-Consulting/fix-coding-practices-numbering
Fix duplicate Practice #35 numbering in CodingPractices.md
2026-03-06 07:26:22 +00:00
Matt Liberty
069bdb293a Merge pull request #9667 from Pinata-Consulting/fix-logger-links
Fix broken links in Logger.md
2026-03-06 07:24:17 +00:00
Øyvind Harboe
2938ef8fcf Update Errors section to reference Logger instead of removed Error.hh
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-06 07:45:57 +01:00
Øyvind Harboe
d55b928d65 Fix incorrect example tool directory reference in DeveloperGuide.md
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-06 07:45:33 +01:00
Øyvind Harboe
082b3133f9 Fix duplicate Practice #35 numbering in CodingPractices.md
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-06 07:45:06 +01:00
Øyvind Harboe
97bc6a2fe3 Fix broken links in Logger.md
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-06 07:43:48 +01:00
Øyvind Harboe
bd8f2ed8a5 Fix missing 'git' prefix in GitGuide.md example
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-06 07:41:43 +01:00
Eder Monteiro
bece2b4565 est: update readme and remove duplicated descriptions from rsz
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
2025-08-06 13:42:24 -03:00
Matt Liberty
aad2e4db59 exa: add an example tool skeleton
For users who wish to add their own code to OpenROAD the exa module acts
as an example with

- Tcl & Python APIs with unit tests
- Debug graphics

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2025-06-02 21:21:06 +00:00
Matt Liberty
bee7f1d30f Various places: remove mpl2 vestiges
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2025-03-17 03:47:13 +00:00
wjrforcyber
8940f4c54b Update(Doc): Missing bracket in Tool Flow Namespace Section
Signed-off-by: wjrforcyber <wjrforcyber@163.com>
2025-01-22 17:50:03 +08:00
Henner Zeller
9cae74b8d8 Add a script to run clang-tidy over all files in parallel, cache the results.
Running clang-tidy is very slow and time consuming. We're already
running it as part of pull requests to incrementally point out
issues, but sometimes it would be good to see an overall summary
or simply a way to figure out which clang-tidy checks make
sense to keep.

This adds a new script to etc/ to allow running clang-tidy
in parallel, while also caching the results. So subsequent
runs only need to process files that have changed.

For simplicity, this script is written in C++, but it can
be invoked as a script as it is self-compiling. So it is
as simple as running

```
  /bin/sh etc/run-clang-tidy-cached.cc
```

(or, with the executable bit set, you can invoke it
 even simpler as `etc/run-clang-tidy-cached.cc`)

Note: The first time, before there is a cache built, this will
take a while.

This will generate two outputs

  * `OpenRoad_clang-tidy.summary` tallies up all findings
    and sorts them top first. This also allows to also
    easily see if there are clang-tidy rules that we might
    not be so interested in.
  * `OpenRoad_clang-tidy.out` contains all the findings in
    one file. This is neat to just put in the editor as
    'compile output' and step through the results.
    (Personally, I use 'cat OpenRoad_clang-tidy.out' as
     `compile-command` in emacs, then it is simple to step
     from issue to issue).

Since clang-tidy needs the compilation database, it is first
necessary to run `cmake` and make the comnpilation database
available in the toplevel directory (it not already):

```
  ln -s build/compile_commands.json .
```

Here is a sample of the summary output running this
script over all files.

```
Details: OpenRoad_clang-tidy.out
Summary: OpenRoad_clang-tidy.summary
---- Summary ----
 2339 [modernize-use-nullptr]
 1360 [modernize-use-default-member-init]
  609 [readability-else-after-return]
  549 [performance-avoid-endl]
  464 [modernize-use-override]
  451 [modernize-macro-to-enum]
  391 [readability-inconsistent-declaration-parameter-name]
  356 [modernize-use-using]
  351 [readability-redundant-casting]
  343 [clang-analyzer-security.insecureAPI.strcpy]
  327 [modernize-deprecated-headers]
  304 [clang-diagnostic-error]
  262 [performance-enum-size]
  252 [performance-unnecessary-value-param]
  242 [bugprone-suspicious-string-compare]
  211 [google-runtime-int]
  176 [readability-avoid-const-params-in-decls]
  153 [modernize-use-emplace]
  152 [google-readability-namespace-comments]
  129 [modernize-use-equals-default]
  117 [clang-analyzer-deadcode.DeadStores]
  108 [google-build-using-namespace]
   91 [modernize-use-bool-literals]
   88 [readability-braces-around-statements]
   87 [readability-const-return-type]
   84 [bugprone-multi-level-implicit-pointer-conversion]
   82 [readability-redundant-member-init]
   78 [bugprone-implicit-widening-of-multiplication-result]
   73 [bugprone-switch-missing-default-case]
   70 [bugprone-reserved-identifier]
   67 [misc-unused-using-decls]
   64 [google-default-arguments]
   62 [readability-redundant-declaration]
   60 [bugprone-assignment-in-if-condition]
   60 [modernize-loop-convert]
   48 [readability-suspicious-call-argument]
   46 [clang-analyzer-unix.Malloc]
 ...long tail...
```

The script is maintained in https://github.com/hzeller/dev-tools
and just copied as-is to etc/ with the only change to run the local
clang-format and change the start directory in the configuration
direction to be `src/`.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2024-12-23 12:15:47 -08:00
Song Luar
2b28607806 Add Doxygen to docs (#4059)
* Add Doxygen to docs

Signed-off-by: luarss <espsluar@gmail.com>
2024-10-21 09:28:52 -03:00
Christian Costa
6cd633a604 docs: Add rule for tcl commands arguments order.
Signed-off-by: Christian Costa <titan.costa@gmail.com>
2024-10-17 18:01:41 +02:00
luarss
66fc4812a2 fix failing CI due to psm
Signed-off-by: luarss <39641663+luarss@users.noreply.github.com>
2024-04-10 02:09:51 +00:00
luarss
0af1835ddd attended review comments
Signed-off-by: luarss <39641663+luarss@users.noreply.github.com>
2024-02-22 14:49:25 +00:00
luarss
ce247af710 Merge branch 'master' into manpage_poc 2024-02-06 15:03:30 +00:00
luarss
c8a072d261 add TclFormat, ReadmeFormat, ;#nodocs -> ;#checkeroff
Signed-off-by: luarss <39641663+luarss@users.noreply.github.com>
2024-02-03 03:23:11 +00:00
Song Luar
8229a95b89 [Docs] OR review (#4030)
* update docs
* grammar change

Signed-off-by: luarss <espsluar@gmail.com>
2024-01-16 11:28:18 -03:00
Song Luar
4464b1c843 [Docs] Addtool patch (#3799)
* update add patch files and docs

Signed-off-by: luarss <espsluar@gmail.com>
2024-01-16 10:40:47 -03:00
Song Luar
3accaf6940 [Docs] TOC changes + Database Math (#3860)
* doc changes + dbmath

Signed-off-by: luarss <espsluar@gmail.com>
Signed-off-by: Song Luar <39641663+luarss@users.noreply.github.com>
2023-08-29 08:30:45 -03:00
Song Luar
6fbc84f343 [Docs] Added OR messages glossary (#3506)
* Added OR messages glossary

Signed-off-by: luarss <espsluar@gmail.com>
Co-authored-by: Vitor Bandeira <vvbandeira@precisioninno.com>
2023-07-19 12:42:31 -03:00
Song Luar
708046a650 [Docs] Sphinx book theme change (#3522)
* new docs theme

Signed-off-by: luarss <espsluar@gmail.com>
2023-07-14 14:50:52 -03:00
Song Luar
b84325b100 [Docs] fix OR to ORFS build links, readme (#3461)
* fix OR to ORFS build links, readme
* fix checklinks
* restructured toc + removed OR tutorials
* shortened Releases section
* added instructions for local OR install
* Added page on error/warning codes provided by etc/find_messages
* readme update
* removed OR messages
* revert changes for toc and Makefile
* modified or/orfs descriptions

Signed-off-by: luarss <espsluar@gmail.com>
2023-06-29 07:54:12 -03:00
vijayank88
87155a4426 README update
Signed-off-by: vijayank88 <paruthi143@gmail.com>
2023-05-02 09:36:44 +00:00
Matt Liberty
17809ffed6 docs/utl: add missing modules to Logger.md and remove unused from Logger.h
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2023-04-25 09:22:18 -07:00
Øyvind Harboe
8003c690f9 docs: single source of truth for building OpenROAD
Also, remove harmful setup instructions:

"sudo etc/DependencyInstaller.sh" will install things into
/usr/local that e.g. messes up your cmake if you are
on Ubuntu.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2023-04-10 23:52:40 +02:00
Ethan Mahintorabi
4ac319f942 Updates tool table
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
2023-02-07 20:25:16 +00:00
Ethan Mahintorabi
c3473e5691 Update docs/contrib/Logger.md
Co-authored-by: Austin Rovinski <rovinski@users.noreply.github.com>
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
2023-01-21 20:22:07 +00:00
Ethan Mahintorabi
e4a6cdc4a6 Update docs/contrib/Logger.md
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
2023-01-21 20:21:59 +00:00
Ethan Mahintorabi
68038f52d4 Update docs/contrib/Logger.md
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
2023-01-21 20:21:52 +00:00
Ethan Mahintorabi
9be1bbb69e Adding more documentation
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
2023-01-21 20:21:02 +00:00
Felipe Garay
01a9fd8843 Fix broken link on how to build from source
Signed-off-by: Felipe Garay <fgaray@google.com>
2023-01-13 12:50:11 -08:00
habibayassin
a0e24e93e6 Move ORFS docs to its own repo (#2603)
* move orfs to its own repo

Signed-off-by: habibayassin <habibayassin@aucegypt.edu>
Signed-off-by: Vitor Bandeira <vvbandeira@users.noreply.github.com>
Co-authored-by: Vitor Bandeira <vvbandeira@users.noreply.github.com>
2023-01-02 07:23:18 -03:00
Austin Rovinski
39cf7fbbcc Clarify ORFS platform bringup for clkgates/latches (#2388)
Clarify ORFS platform bringup for clkgates/latches

Signed-off-by: Austin Rovinski <rovinski@users.noreply.github.com>
2022-10-20 02:05:33 -04:00
Vitor Bandeira
d702c8dabc Missing links and note on private pipelines
Signed-off-by: Vitor Bandeira <vitor.vbandeira@gmail.com>
2022-03-31 20:17:02 -03:00
Vitor Bandeira
4f99c0b2eb Add docs about CI.
Signed-off-by: Vitor Bandeira <vitor.vbandeira@gmail.com>
2022-03-31 19:31:26 -03:00
Vitor Bandeira
89b90e9a5c Merge pull request #1479 from vijayank88/FlowVar
OpenROAD flow variables document
2021-12-30 07:54:14 -03:00
vijayank88
316ea1629e OR Flow variable description updated
Signed-off-by: vijayank88 <paruthi143@gmail.com>
2021-12-29 08:39:29 +00:00
Andrew Kennings
3d5319c137 Merge remote-tracking branch 'upstream/master' 2021-12-28 15:06:27 -05:00
vijayank88
4aee7b245a OR Flow variable
Signed-off-by: vijayank88 <paruthi143@gmail.com>
2021-12-28 16:59:27 +00:00