-
Notifications
You must be signed in to change notification settings - Fork 331
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
Introduce EditorConfig #681
Conversation
szepeviktor
commented
Sep 18, 2023
•
edited
Loading
edited
- The contributed code is licensed under GPL v2.0
- Contributor Licence Agreement (CLA) is signed
- util/update-modules has been ran
- Documentation updated
- Test suite update
@szepeviktor, what is the status of your PR? Are you still working on it and want to keep it draft? |
Finishing it right away. |
Using consistent (by simply counting spaces) indentation is a no-go for perl code. Parenthesis spacing is so chaotic in the code that I'm unable to select a style. For example
|
Percona Toolkit is based on Maatikit product. Here are the coding standards for Maatkit: https://code.google.com/archive/p/maatkit/wikis/CodingStandards.wiki. They were not fully followed in recent years but I believe we can restore them. Here is example config for perltidy:
|
Thank you.
|
perltidy makes artistic indentations go away - sub _d {
- my ($package, undef, $line) = caller 0;
- @_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; }
- map { defined $_ ? $_ : 'undef' }
- @_;
- print STDERR "# $package:$line $PID ", join(' ', @_), "\n";
- }
+ sub _d {
+ my ( $package, undef, $line ) = caller 0;
+ @_ = map { ( my $temp = $_ ) =~ s/\n/\n# /g; $temp; }
+ map { defined $_ ? $_ : 'undef' } @_;
+ print STDERR "# $package:$line $PID ", join( ' ', @_ ), "\n";
+ } |
I have modified line length and added @svetasmirnova This is above my pay grade. |
@szepeviktor I think it does not make sense to format code just in sake to make it compatible with perltidy. Let's have only 3 spaces in the config and don't do other formatting. We can always add additional configuration rules into .editorconfig later. |
Done. |