Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix files tags headers #23564

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

BazookaJoe1900
Copy link
Member

@BazookaJoe1900 BazookaJoe1900 commented Aug 18, 2024

Solved Problem

many files has wrong file tag on their header description.

Solution

I wrote script to find and fix the files

@BazookaJoe1900
Copy link
Member Author

  • I have only searched for c, cpp, h and hpp files
  • I have only fixed tag look like @file
  • I have only fixed the main repo

if there is need to expend the script, tell me

@dagar
Copy link
Member

dagar commented Aug 19, 2024

How about eliminating them instead? I can't imagine these actually provide value given how wrong they frequently are.

I would also propose dropping per file author tags as well, that's what git blame is for.

FYI @bresch

@BazookaJoe1900
Copy link
Member Author

I actually like the file name on the file it self. when it correct, it helps when you try to search the file references.
meaning, if I want to find where xxx.h is used, it help to see xxx.h too on the search results.

about the authors names, it issue of credit, I thinks.

@BazookaJoe1900
Copy link
Member Author

@dagar any reason not to merge it? there is need to change anything?

@bresch
Copy link
Member

bresch commented Sep 16, 2024

I would also propose dropping per file author tags as well, that's what git blame is for.

I agree 100% https://youtube.com/clip/UgkxFrPo30esfK5g9chSNaljU-IMqmZrqVUR?si=R5nxZNwefYnWGVja

@BazookaJoe1900
Copy link
Member Author

@bresch what do you think about the file name? should we leave them? I prefer to keep, like I said it helps me to when I search for file references, to see the file itself on the search results

@dakejahl
Copy link
Contributor

@BazookaJoe1900 if you're using sublime text or vscode you can use ctrl + p to search for file names

@BazookaJoe1900
Copy link
Member Author

the original pr meant to fix the errors tags.
I think that merging the current pr is valid, and wider change of the files header can be done on another pr.

I am without a firm opinion about the author tag. but it can be done after decision will be made about 'new' header format.
who should decide that? How about poll?

BTW
I checked the option of changing the authors tags, which is more complicated, because there are different syntax of this, for example:

on some places the name and the 'author' are mixed with the copyright:

* Copyright (C) 2009, 2016 Gregory Nutt. All rights reserved.
* Authors: Gregory Nutt <[email protected]>

there are some 'inline' notes:

// Additional functions - @author Doug Weibel <[email protected]>

I can 'clear' only the basic ones like this one:

* @author Lorenz Meier <[email protected]>
* @author Anton Babushkin <[email protected]>
* @author Sander Smeets <[email protected]>
* @author Matthias Grob <[email protected]>
* @author Beat Küng <[email protected]>
*
*/

@bresch
Copy link
Member

bresch commented Sep 19, 2024

You could leave the file names if you find them useful. The problem is -as shown by this PR- ppl tend to copy-paste the header from another file or change the name of the file and often forget to update it.

Removing the author names starting with @author would already be useful, yes. Feel free to do another PR for that.

@BazookaJoe1900 BazookaJoe1900 merged commit 4d83bad into PX4:main Sep 19, 2024
52 checks passed
@BazookaJoe1900 BazookaJoe1900 deleted the pr-fix_file_tag branch September 19, 2024 07:02
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.

4 participants