Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 3 years ago

#5891 closed enhancement (fixed)

scrutinizer-ci.com master ticket

Reported by: DJPaul Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version:
Component: Core Keywords:
Cc: stephen@…

Description

scrutinizer-ci.com is a static code analysis tool. I've set up a (provisional) account for BuddyPress, and you can see the reports here: https://scrutinizer-ci.com/g/buddypress/BuddyPress/issues/master

While I don't know if it's something worthwhile to use in the long term, I think it is worthwhile if we take a look at its feedback over the next couple of BuddyPress releases. I'm beginning to look through the reports and will create tickets as necessary.

Let's use this as a master ticket for discussion of scrutinizer-ci and to link to reported tickets.

Change History (24)

#1 @DJPaul
5 years ago

I've looked through a few files so far and it seems that a fairly common source of issues are mistakes in our phpDoc blocks (wrong return type specified, typo in the phpDoc syntax, and so on). I'm going to commit a small phpDoc correction for one file and then see/confirm if that change makes scrutinizer happy, or if I've misunderstood what we need to fix.

#2 @djpaul
5 years ago

In 9037:

Forums: correct phpDoc for the property declarations in the main template loop class.

See #5891

#3 @DJPaul
5 years ago

Yes, it cleared the warnings it had found (and then added some more, yay): https://scrutinizer-ci.com/g/buddypress/BuddyPress/inspections/4ccdf139-b4d6-40d0-96cd-22e66b5c1cb4

Maybe we should just treat this as a phpDoc sprint sometime.

#4 follow-up: @netweb
5 years ago

  • Cc stephen@… added

This is cool, I ran bbPress though scrutinizer-ci a couple of months ago, it wasn't pretty ;)

Some FYI:

Related: #5847 #5022

#5 in reply to: ↑ 4 @johnjamesjacoby
5 years ago

Replying to netweb:

  • @JohnJamesJacoby has also been code sniffing, though I'm not sure with what though ;) [bbPress5466]

A decent write-up of my approximate process here: https://rtcamp.com/tutorials/standards/php/code-sniffer/

#6 @DJPaul
5 years ago

  • Milestone changed from 2.2 to Future Release

#7 @DJPaul
5 years ago

See also #6097

#8 @johnjamesjacoby
5 years ago

In 9351:

SimplifyABSPATH checks across all files for improved Scrutinizer compliance.

See #5891. Fixes #5847.

#9 @johnjamesjacoby
5 years ago

In 9373:

Coding standards improvements to BP_Activity_Activity::save(). See #5138, #5891.

#10 @johnjamesjacoby
5 years ago

In 9374:

Add brackets and remove $bp global touch in BP_Activity_Activity::get_id(). See #5138, #5891.

#11 @johnjamesjacoby
5 years ago

In 9379:

Move variable assignments inside conditional statements in bp-activity-classes.php. See #5891.

#12 @johnjamesjacoby
5 years ago

In 9380:

In BP_Activity_Activity::get_scope_query_sql() remove unused variable and add more strict comparisons to $scopes to ensure parsing of correct variable types. See #5891.

#13 @johnjamesjacoby
5 years ago

In 9393:

Fix incorrect phpdoc parameter for bp_core_filter_edit_post_link(). See #5891.

#14 @johnjamesjacoby
5 years ago

  • Component changed from Component - Any/All to Tools - Code Improvement

#15 @johnjamesjacoby
5 years ago

In 9458:

Simplify more ABSPATH checks. See #5847, #5891, r9351.

#16 @johnjamesjacoby
5 years ago

In 9460:

Remove break that is never reached from bp_get_group_join_button(). See #5891.

#17 @johnjamesjacoby
5 years ago

In 9530:

Scrutinizer: Improve PHPDoc type hints for bp_activity_can_comment_reply() and bp_activity_current_comment() usages. See #5891.

#18 @DJPaul
3 years ago

  • Component changed from Tools - Code Improvement to Core

#19 @DJPaul
3 years ago

  • Type changed from task to enhancement

#20 @djpaul
3 years ago

In 11032:

Fix indentation across all components.

Props Scrutinizer-CI

See #5891

#21 @djpaul
3 years ago

In 11033:

Core, Groups, Members, XProfile: improve code readability

This grab bag of misc. improvements improves code readability across a handful of places identified by Scrutinizer-CI

See #5891

#22 @djpaul
3 years ago

In 11034:

Groups: fix PHPDoc header for bp_get_group_avatar.

Props Scrutinizer-CI

See #5891

#23 @djpaul
3 years ago

In 11035:

Activity, Groups, XProfile: fix some PHPDoc parameter types.

Props Scrutinizer-CI

See #5891

#24 @DJPaul
3 years ago

  • Milestone changed from Future Release to 2.8
  • Resolution set to fixed
  • Status changed from new to closed

I'm going to close this ticket. Scrutinizer-CI seems to have little value and is very complex to try to set up correctly, but as it's in place, we may as well keep the integration until some part of it is replaced with something.

Note: See TracTickets for help on using tickets.