Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)DA
DarkPlayer @lemmy.world
Posts 5
Comments 2
What should semantic diffs highlight: The change or its effect?
  • Many code formatters decide whether to use " or ' based on some configuration and whether the default one would require escaping. So if you are using such a code formatter, this is no longer a deliberate choice unless you explicitly override the behavior with annotations.

    I am not sure whether your solution of using a less intense color for the unchanged part of the string would make it clearer. It is just more similar to other diff tools that highlight the whole line with a less intense color if it contains changes.

  • semanticdiff.com What should semantic diffs highlight: The change or its effect?

    Language aware diffs can detect changes in the semantics of the code that are invisible to traditional diffs. How should they be highlighted?

    What should semantic diffs highlight: The change or its effect?
    19
    semanticdiff.com How far should a programming language aware diff go?

    Language aware diffs remove noise from diffs by hiding irrelevant changes, but where do you draw the line between relevant and irrelevant changes?

    How far should a programming language aware diff go?
    22
    semanticdiff.com Unicode tricks in pull requests: Do review tools warn us?

    In this blog post I take a look at how well GitHub, GitLab and Bitbucket support reviewers in finding malicious code changes in pull requests.

    Unicode tricks in pull requests: Do review tools warn us?
    18
    3 Predictions About The Future Of Code Reviews
  • Checking the return value is just a very basic example of a consistency check and is already supported by some tools. But I think we are heading towards more advanced and project specific checks, such as identifying missing authentication checks. This won't work based on hard coded rules or hints (like [[nodiscard]]) but will be detected because this API endpoint looks different from the others. However, even the return value example is still relevant. Something like [[nodiscard]] isn't supported by all programming languages nor is it used in all third party libraries or system header files.

    Regarding semantic merges: You're right that automated tools will not be able to determine whether the merged code makes sense from a logical point of view. But that is not the point of this section. The main idea is that by parsing the code and merging the ASTs merge tools will be able to resolve conflicts even if there are changes on the same line. And they can determine whether the generated syntax would be valid. It is still up to the developer to verify that the merged code makes logical sense.

  • semanticdiff.com 3 Predictions About The Future Of Code Reviews

    What will be the next big step for code reviews? Will AI-based reviews replace human reviews? Join me as I share my thoughts on the future of code reviews.

    3 Predictions About The Future Of Code Reviews
    2
    semanticdiff.com SemanticDiff Now Available For GitHub

    SemanticDiff for the web: Our pull request viewer lets you review GitHub pull requests with a programming language aware diff right in your browser.

    1