Skip to content

Conversation

shattered
Copy link
Contributor

… a screenshot.

@markpizz
Copy link
Contributor

markpizz commented Oct 1, 2025

These changes are good and should be merged AFTER the tab characters in the change are replaced with spaces (as is standard for all source in simh).

@shattered
Copy link
Contributor Author

Right. Speaking of source code style -- it's unusual enough that clang-format cannot quite handle it (no indent in function body, no outdent for closing braces etc.). Is there another tool that I could use instead?

My best attempt at .clang-format:

AlignAfterOpenBracket: DontAlign
# broken until v20
AlignArrayOfStructures: Left
# broken -- https://github.com/llvm/llvm-project/issues/75035
# AlignTrailingComments:
#   Kind: Leave
BraceWrapping:
  AfterControlStatement: Never
  AfterFunction: True
  AfterStruct: False
  BeforeElse: True
BreakBeforeBraces: Custom
ColumnLimit: 132
Cpp11BracedListStyle: False
# IndentCaseLabels: True
IndentWidth: 4
SpaceBeforeParens: Always
TabWidth: 4
UseTab: Never

@markpizz
Copy link
Contributor

markpizz commented Oct 1, 2025

I'm not sure about clang format details. Historically, changes to an existing source module should follow the indentation style of that module. Providing new modules lets you choose the your favorite style.

Meanwhile, the tab expansion is fine, but this PR should have all the changes squashed into one commit with your functional changes and the tabs expanded. This could be achieved by something like this:

% git reset --soft head^^
% git commit with your original commit comment
% git push -f to your github repo.  which will update the PR to have the single commit

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.

2 participants