This is why I support this feature request.Īs an industry could stand to move away from having opinions about how other developers format their source code, in favor of expressiveness, ease and inclusiveness. Each developer can then individually format code according to how each thinks best. diff is a good utility that has plenty of features for ignoring whitespace. Do not impose whitespace and indentation formatting constraints for source code if the language itself does not. You can use an alternate diff command using the -diff-cmd argument for svn diff. Moreover, this raises the bar for entry for new people, making coding a less inclusive industryĭo away with whitespace as a concern when writing or reviewing code.Opinionated formatters impose a cognitive load on everyone, making individual coders work harder to read their own code Expressiveness and facility is important when coding and reading code, and I would argue this is top priority. This reduces errors and cognitive load when reviewing code and when troubleshooting. The problem that formatters solve: whitespace and indentation is consistent across developers and time, so that changes between commits are obvious. Guillaume Discussion Guillaume Audirac - 2 files to be compared and configuration src. I use WinMerge which has an > option to ignore whitespace differences, but I'm sure most diff software has > a similar feature if you know where to look. I am going to be comparing huge files that I don't want to modify. If, however, you mean is it possible to view the difference between the two > versions ignoring whitespace changes, then yes. In this example I would rename it IgnoreColumns1-7, 20-22.dll, select it in the plugins menu, and choose 'Pre-Differ.' but it has never worked. Options enabled: Whitespace Ignore all Ignore blank lines Yes Ignore carriage return differences Yes Thanks. I know WinMerge has a 'IgnoreColumns' plugin but I have never go this working. I suspect that opinionated formatters such as Prettier solve one problem but at high cost. I attached two files and the WinMerge configuration. As with everything, I have Thoughts On This.
0 Comments
Leave a Reply. |