Skip to content
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

New plugin 'workbench': initial commit. (Follow-up/clean PR) #601

Merged
merged 2 commits into from Sep 27, 2017
Merged

New plugin 'workbench': initial commit. (Follow-up/clean PR) #601

merged 2 commits into from Sep 27, 2017

Conversation

lpaulsen93
Copy link
Contributor

This is a new plugin called workbench.

It has the following features:

  • assign multiple projects to a workbench
  • assign directories and file patterns to each project for easy file listing
  • create "global" workbench or project bookmarks to have quick access to often used files
  • the plugin uses relative pathes (a project file path is relative to the workbench file path, a file path is relative to the project file path)
  • languages: english and german

For instructions please see the readme file.

The plugin is heavily based on the project organizer plugin, thanks to Jiří Techet. Icons are taken from the gnome desktop.

This is a follow-up/clean PR for PR #598. All changes are included, this PR is based on todays master.

@lpaulsen93 lpaulsen93 mentioned this pull request Sep 2, 2017
@lpaulsen93
Copy link
Contributor Author

Just as a follow-up: I consider this PR as being in a good condition. If there are any more change-requests please let me know.

@frlan frlan self-requested a review September 20, 2017 08:37
@frlan frlan self-assigned this Sep 20, 2017
{
if (elem->data == NULL)
{
continue;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this ever passing this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remeber right, yes. There was an error sceanario where I had a crash if NULL was not catched. I think it happened if a branch is empty because of not matching file patterns.

@frlan
Copy link
Member

frlan commented Sep 20, 2017

Did you check it with make check?

@lpaulsen93
Copy link
Contributor Author

Yes, I just did again because I do not remeber when I last checked it. No messages, seems to be OK (Only saw messages for plugin xmlsnippets but that's not my building site).

One question:
What exactly is make check doing? Do I need to install additional tools to get the full usage/checks?

@codebrainz
Copy link
Member

make check is for running tests, which I don't think GP has any of. @frlan probably meant make distcheck which checks that build system is OK (ie. no missing files, etc).

@frlan
Copy link
Member

frlan commented Sep 21, 2017

It needs cppcheck

@frlan
Copy link
Member

frlan commented Sep 21, 2017

Please check for at least
sidebar.c:101: error: Uninitialized variable: elem
sidebar.c:249: error: Uninitialized variable: elem
sidebar.c:282: error: Uninitialized variable: elem
utils.c:76: error: Uninitialized variable: elem
wb_project.c:541: error: Uninitialized variable: elem
wb_project.c:585: error: Uninitialized variable: elem
wb_project.c:731: error: Uninitialized variable: elem
wb_project.c:782: error: Uninitialized variable: elem
wb_project.c:804: error: Uninitialized variable: elem2
wb_project.c:809: error: Uninitialized variable: elem
wb_project.c:862: error: Uninitialized variable: elem2
wb_project.c:867: error: Uninitialized variable: elem

@lpaulsen93
Copy link
Contributor Author

I checked that before, they are fine. That are all calls to foreach_slist, e.g.

static guint wb_project_get_file_count(WB_PROJECT *prj)
{
	GSList *elem;
	guint filenum = 0;

	foreach_slist(elem, prj->directories)
	{
		filenum += ((WB_PROJECT_DIR *)elem->data)->file_count;
	}
	return filenum;
}

But elem gets assigned the elements from prj->directories, so everything is OK. Looks like ccpcheck is having a problem here with foreach_slist.

@codebrainz
Copy link
Member

You could probably add suppressions to AM_CPPCHECKFLAGS, initialize those variables to NULL, or just use a proper for loop like:

for (GSList *elem = prj->directories; elem; elem = elem->next)

Which is only 11 extra characters, is much more readable/less magic, and won't need to be changed if those weird foreach macros are ever deprecated.

@frlan frlan merged commit 109166c into geany:master Sep 27, 2017
@lpaulsen93
Copy link
Contributor Author

Cool 👍 THANKS FOR ACCEPTING IT!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants