STYLE: make rules more granular and consistent, add examples #156

Open
trinity wants to merge 6 commits from style-c into main
Owner
No description provided.
trinity added the
enhancement
label 2024-08-08 02:33:01 -06:00
trinity added 1 commit 2024-08-08 02:33:01 -06:00
trinity requested review from emma 2024-08-08 02:33:09 -06:00
trinity reviewed 2024-08-08 02:33:50 -06:00
STYLE Outdated
@ -112,0 +119,4 @@
1. Avoid:
- function pointers; see [0].
- heap memory allocation; see [0].
- too many levels of dereferences; see [0].
Author
Owner

I struggled with coming up with this example. Could someone proofread this?

I struggled with coming up with this example. Could someone proofread this?
trinity marked this conversation as resolved
emma added 1 commit 2024-09-05 12:44:23 -06:00
Owner

I made changes to allow simple citation of the guidelines and clarify some of the visual hierarchy of the document.

I made changes to allow simple citation of the guidelines and clarify some of the visual hierarchy of the document.
emma added 1 commit 2024-09-05 15:55:51 -06:00
emma added 1 commit 2024-09-07 12:51:32 -06:00
trinity reviewed 2024-09-09 07:36:32 -06:00
STYLE Outdated
@ -9,0 +31,4 @@
case possibility:
statement;
break;
case default:
Author
Owner

This should just be default: (so, sed 34s:case ::); as-is this is a syntax error.

This should just be `default:` (so, `sed 34s:case ::`); as-is this is a syntax error.
emma marked this conversation as resolved
trinity reviewed 2024-09-09 07:37:44 -06:00
STYLE Outdated
@ -34,3 +71,1 @@
case 'l': mode |= LESS; break;
default: return usage(s);
}
5. Fixed bounds for loops [0].
Author
Owner

I fear this is impossible; dj(1), for instance, necessarily can't put an upward bound on read cycles.

I fear this is impossible; dj(1), for instance, necessarily can't put an upward bound on read cycles.
Author
Owner

Maybe, "where possible"?

Maybe, "where possible"?
emma marked this conversation as resolved
emma added 1 commit 2024-09-10 02:00:18 -06:00
emma added 1 commit 2024-09-10 02:05:05 -06:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin style-c:style-c
git checkout style-c
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bonsai/harakit#156
No description provided.