Skip to content

Strip trailing whitespace from configs - #48

Open
alexc96161 wants to merge 1 commit into
masterfrom
remove-config-trailing-whitespace
Open

Strip trailing whitespace from configs#48
alexc96161 wants to merge 1 commit into
masterfrom
remove-config-trailing-whitespace

Conversation

@alexc96161

Copy link
Copy Markdown

No description provided.

@johnbellardo

Copy link
Copy Markdown
Contributor

This doesn't address the case when there are extra non-whitespace characters after the space.

@alexc96161

alexc96161 commented Aug 26, 2026

Copy link
Copy Markdown
Author

taking a look...

@alexc96161

alexc96161 commented Aug 26, 2026

Copy link
Copy Markdown
Author

Sorry I don't understand. If there are extra non-whitespace characters after the space, then the whitespace should NOT be removed, right? And this code should NOT remove that whitespace to my understanding.

@alexc96161

alexc96161 commented Aug 26, 2026

Copy link
Copy Markdown
Author

Testing this on the board with mZ and side panels. Change works here

Previously, errors were seen when we had a space here https://asof.atl.calpoly.edu/fsw/z-panel-driver/-/commit/4072f06b08b7e8afdc9741048d6d423a46555755

Now with libproc library copied over:
Manually added space to config
Screenshot 2026-08-25 at 8 52 57 PM
Ran dev-read. There were no parsing errors or warnings on dev-read
Screenshot 2026-08-25 at 8 54 00 PM

@johnbellardo

Copy link
Copy Markdown
Contributor

Sorry, I read the change out of context last time. I agree this will also ignore trailing spaces on a line as written. Since we are changing behavior should we use isspace() instead to also catch horizontal tab, vertical tab, and page break?

@alexc96161

Copy link
Copy Markdown
Author

Yeah I can agree with that

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