liuch / dmarc-srg

A php parser, viewer and summary report generator for incoming DMARC reports.
GNU General Public License v3.0
218 stars 32 forks source link

Add .gitattributes and .editorconfig #77

Closed williamdes closed 1 year ago

liuch commented 1 year ago

Hello @williamdes, thanks for the PR .gitattributes is good, but .editorconfig doesn't fit my project code. Moreover, the coding style in .php and .js files are different.

williamdes commented 1 year ago

Hello @williamdes, thanks for the PR .gitattributes is good, but .editorconfig doesn't fit my project code. Moreover, the coding style in .php and .js files are different.

That's okay I can adjust it, what are the settings for your project?

liuch commented 1 year ago
williamdes commented 1 year ago

Well

  • JavaScript: indent_style = tab, insert_final_newline = true;
  • PHP: indent_style = space, insert_final_newline = false;

Okay, I made some changes to what you suggested to match the actual situation of files

I used editorconfig-checker -disable-indent-size from https://github.com/editorconfig-checker/editorconfig-checker#readme

to check if all files are following the config

williamdes commented 1 year ago

This final commit makes it all right, now you can run editorconfig-checker with any argument

classes/Report/SummaryReport.php:
    248: Wrong amount of left-padding spaces(want multiple of 4)
    249: Wrong amount of left-padding spaces(want multiple of 4)
    262: Wrong amount of left-padding spaces(want multiple of 4)
    265: Wrong amount of left-padding spaces(want multiple of 4)
    307: Wrong amount of left-padding spaces(want multiple of 4)
    308: Wrong amount of left-padding spaces(want multiple of 4)
    379: Wrong amount of left-padding spaces(want multiple of 4)
    380: Wrong amount of left-padding spaces(want multiple of 4)

8 errors found

I made this shut up Feel free to push a commit to fix it

liuch commented 1 year ago

Do you mind if I make fixes outside of your PR? It turns out that my editor automatically adds EOL to the end of the file, and I don't even see that.

williamdes commented 1 year ago

Do you mind if I make fixes outside of your PR? It turns out that my editor automatically adds EOL to the end of the file, and I don't even see that.

For sure, you can work on it like the other one or merge it and do tweaks That's okay for me At least you have a config that's coherent with the files, now you can tweak it

williamdes commented 1 year ago

Merged as b51f32c8df3e7c493397b3fdac62e305ec96e303 and 7fb1d73053f86206f835f41bca2b76415e0fc5f3