Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Encourage avoidance of duplicated code? #8

@claremacrae

Description

@claremacrae

I’m not sure how much you want to focus on general good development practices…

But when I see the “Print file path” example in Context Menus I have the urge to refactor to remove the duplicated code… For lots of reasons, including foreseeing the inevitable future bug-fix or new feature where the two accidentally become inconsistent.

The current code is good from an explanatory perspective, though… So I wonder whether it’s worth a second example that shows doing the same thing, but having the common code moved to something like a local helper function - named so that it either creates the one menu item - or to add all the menu items, as the plugin grows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions