Skip to content

Fix missing checks to enable beman-tidy with --require-all#31

Open
teodor994 wants to merge 7 commits into
bemanproject:mainfrom
teodor994:issue252-require-all
Open

Fix missing checks to enable beman-tidy with --require-all#31
teodor994 wants to merge 7 commits into
bemanproject:mainfrom
teodor994:issue252-require-all

Conversation

@teodor994
Copy link
Copy Markdown
Contributor

@teodor994 teodor994 commented Apr 25, 2026

Issue: bemanproject/beman-tidy#252

Add hooks in pre-commit file : --require-all.

Modify namespace name into beman::cstring_view to align with beman [cpp.namespace] documentation.

Output:

teodorandrei@Teodors-MacBook-Pro cstring_view % pre-commit run --verbose --all-files
trim trailing whitespace.................................................Passed
- hook id: trailing-whitespace
- duration: 0.04s
fix end of files.........................................................Passed
- hook id: end-of-file-fixer
- duration: 0.04s
check yaml...............................................................Passed
- hook id: check-yaml
- duration: 0.06s
check for added large files..............................................Passed
- hook id: check-added-large-files
- duration: 0.06s
clang-format.............................................................Passed
- hook id: clang-format
- duration: 0.06s
CMake linting............................................................Passed
- hook id: gersemi
- duration: 0.09s

Warning: unknown command 'beman_install_library' used at:
/Users/teodorandrei/Desktop/beman project/cstring_view/CMakeLists.txt:52:1

codespell................................................................Passed
- hook id: codespell
- duration: 0.09s
beman-tidy...............................................................Passed
- hook id: beman-tidy
- duration: 0.18s

beman-tidy pipeline started ...

Running check [Requirement][license.approved] ... 
[info][license.approved]: Valid Apache License - Version 2.0 with LLVM Exceptions found in LICENSE file.
	check [Requirement][license.approved] ... passed

Running check [Requirement][license.apache_llvm] ... 
	check [Requirement][license.apache_llvm] ... passed

Running check [Requirement][license.criteria] ... 
[info][license.criteria]: beman-tidy cannot actually check license.criteria. Please ignore this message if license.approved has passed. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#licensecriteria for more information.
[skipped][license.criteria]: beman-tidy cannot actually check license.criteria. Please ignore this message if license.approved has passed. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#licensecriteria for more information.
Running check [Requirement][license.criteria] ... skipped

Running check [Recommendation][library.name] ... 
[info][library.name]: beman-tidy cannot actually check library.name. Please ignore this message if cmake.library_name and repository.name have passed. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#libraryname for more information.
[skipped][library.name]: beman-tidy cannot actually check library.name. Please ignore this message if cmake.library_name and repository.name have passed. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#libraryname for more information.
Running check [Recommendation][library.name] ... skipped

Running check [Requirement][repository.name] ... 
	check [Requirement][repository.name] ... passed

Running check [Requirement][repository.default_branch] ... 
	check [Requirement][repository.default_branch] ... passed

Running check [Requirement][repository.codeowners] ... 
	check [Requirement][repository.codeowners] ... passed

Running check [Requirement][repository.code_review_rules] ... 
[info][repository.code_review_rules]: beman-tidy cannot actually check repository.code_review_rules. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#repositorycode_review_rules.
[skipped][repository.code_review_rules]: beman-tidy cannot actually check repository.code_review_rules. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#repositorycode_review_rules.
Running check [Requirement][repository.code_review_rules] ... skipped

Running check [Requirement][repository.disallow_git_submodules] ... 
	check [Requirement][repository.disallow_git_submodules] ... passed

Running check [Requirement][release.github] ... 
[info][release.github]: beman-tidy cannot actually check release.github. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#releasegithub.
[skipped][release.github]: beman-tidy cannot actually check release.github. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#releasegithub.
Running check [Requirement][release.github] ... skipped

Running check [Recommendation][release.notes] ... 
[info][release.notes]: beman-tidy cannot actually check release.notes. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#releasenotes.
[skipped][release.notes]: beman-tidy cannot actually check release.notes. See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#releasenotes.
Running check [Recommendation][release.notes] ... skipped

Running check [Requirement][release.godbolt_trunk_version] ... 
	check [Requirement][release.godbolt_trunk_version] ... passed

Running check [Requirement][toplevel.cmake] ... 
	check [Requirement][toplevel.cmake] ... passed

Running check [Requirement][toplevel.license] ... 
	check [Requirement][toplevel.license] ... passed

Running check [Requirement][toplevel.readme] ... 
	check [Requirement][toplevel.readme] ... passed

Running check [Requirement][readme.title] ... 
	check [Requirement][readme.title] ... passed

Running check [Requirement][readme.badges] ... 
	check [Requirement][readme.badges] ... passed

Running check [Recommendation][readme.purpose] ... 
[info][readme.purpose]: beman-tidy cannot actually check readme.purpose. Please add a one line summary describing the library's purpose.See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#readmepurpose.
[skipped][readme.purpose]: beman-tidy cannot actually check readme.purpose. Please add a one line summary describing the library's purpose.See https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md#readmepurpose.
Running check [Recommendation][readme.purpose] ... skipped

Running check [Requirement][readme.implements] ... 
	check [Requirement][readme.implements] ... passed

Running check [Requirement][readme.library_status] ... 
	check [Requirement][readme.library_status] ... passed

Running check [Requirement][readme.license] ... 
	check [Requirement][readme.license] ... passed

Running check [Requirement][directory.sources] ... 
	check [Requirement][directory.sources] ... passed

Running check [Requirement][directory.tests] ... 
	check [Requirement][directory.tests] ... passed

Running check [Requirement][directory.examples] ... 
	check [Requirement][directory.examples] ... passed

Running check [Requirement][directory.docs] ... 
	check [Requirement][directory.docs] ... passed

Running check [Requirement][directory.papers] ... 
	check [Requirement][directory.papers] ... passed

Running check [Requirement][file.copyright] ... 
	check [Requirement][file.copyright] ... passed

Running check [Requirement][cpp.namespace] ... 
	check [Requirement][cpp.namespace] ... passed


beman-tidy pipeline finished.

Summary    Requirement:  22 checks passed, 0 checks failed, 3 checks skipped,  19 checks not implemented.
Summary Recommendation:  0 checks passed, 0 checks failed, 3 checks skipped,  0 checks not implemented.

Coverage    Requirement: 100.00% (28/28 checks passed).
Coverage Recommendation:   0.00% (0/0 checks passed).
Coverage          TOTAL: 100.00% (28/28 checks passed).

…ation

Signed-off-by: Teodor Andrei Vica <teodorvica@gmail.com>
Signed-off-by: Teodor Andrei Vica <teodorvica@gmail.com>
Comment thread include/beman/cstring_view/cstring_view.hpp Outdated
Signed-off-by: Teodor Andrei Vica <teodorvica@gmail.com>
Signed-off-by: Teodor Andrei Vica <teodorvica@gmail.com>
@teodor994 teodor994 changed the title Issue252 require all Add hooks in pre-commit file : Issue252 Apr 25, 2026
@neatudarius neatudarius changed the title Add hooks in pre-commit file : Issue252 Fix missing checks to enabled beman-tidy with --require-all Apr 25, 2026
Signed-off-by: Teodor Andrei Vica <teodorvica@gmail.com>
@teodor994 teodor994 marked this pull request as ready for review April 25, 2026 14:23
@teodor994 teodor994 requested a review from dascandy as a code owner April 25, 2026 14:23
Copy link
Copy Markdown
Member

@neatudarius neatudarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but wait codeowners for continuing

Comment thread .pre-commit-config.yaml
hooks:
- id: beman-tidy
- id: beman-tidy
args: [".", "--verbose", "--require-all"]
Copy link
Copy Markdown
Member

@neatudarius neatudarius Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peter (@dascandy ), would you like to apply all RECOMMENDATIONS (actually only one left) and enabled --require-all in beman-tidy CI?

Context: During today's hackathon, as discussed in the meeting last Monday (and announced on discourse - https://discourse.bemanproject.org/t/heads-up-bemanification-event-saturday-april-25/575/2), we enabled beman-tidy in default mode on CI (it only checks for requirements; NOT recommendations).

My advice is to enabled --require-all, but as discussed with @bemanproject/project-leads , final decision is at library owners.

LE Also left similar suggestion on attached issue bemanproject/beman-tidy#252 (comment)

@neatudarius neatudarius changed the title Fix missing checks to enabled beman-tidy with --require-all Fix missing checks to enable beman-tidy with --require-all Apr 25, 2026
@dascandy
Copy link
Copy Markdown
Collaborator

dascandy commented May 1, 2026

I'm a bit confused why this PR exists. It's moving a single-type library into a namespace, with the same name as the type. From a strict rules point of view that might make sense, but it only makes it harder to use, and breaks for all existing users, while bringing pretty much no benefit.

Why is this a thing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants