[pull] main from miniflux:main#199
Merged
pull[bot] merged 7 commits intoDeathzero44:mainfrom Jun 30, 2025
Merged
Conversation
- Use an array of strings instead of a regex, like done in ef13756 - Extract the `shouldRemove` function from `removeUnlikelyCandidates`, as there is no reason to have it there instead of being a proper standalone function. - Improve a condition, where the goquery selection would have its `id` attribute left unchecked if a `class` one was present, regardless of if `class` was a candidate to removal or not. - Add some comments
- Use a proper division instead of multiplying by a float. - Extract a condition in the parent scope - Use an else-if construct instead of a simple if
before:
```
// feed.go:154 | Size: 240 (Optimal: 224)
type FeedCreationRequest struct {
FeedURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
CategoryID int64 ■ ■ ■ ■ ■ ■ ■ ■
UserAgent string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Cookie string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Username string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Password string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Crawler bool ■
Disabled bool ■
NoMediaPlayer bool ■
IgnoreHTTPCache bool ■
AllowSelfSignedCertificates bool ■
FetchViaProxy bool ■ □ □
UrlRewriteRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
DisableHTTP2 bool ■ □ □ □ □ □ □ □
ScraperRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
RewriteRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
BlocklistRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
KeeplistRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
BlockFilterEntryRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
KeepFilterEntryRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
HideGlobally bool ■ □ □ □ □ □ □ □
ProxyURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
}
```
after:
```
// feed.go:154 | Size: 224
type FeedCreationRequest struct {
FeedURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
CategoryID int64 ■ ■ ■ ■ ■ ■ ■ ■
UserAgent string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Cookie string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Username string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Password string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Crawler bool ■
Disabled bool ■
NoMediaPlayer bool ■
IgnoreHTTPCache bool ■
AllowSelfSignedCertificates bool ■
FetchViaProxy bool ■
HideGlobally bool ■
DisableHTTP2 bool ■
ScraperRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
RewriteRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
BlocklistRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
KeeplistRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
BlockFilterEntryRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
KeepFilterEntryRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
UrlRewriteRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
ProxyURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
}
```
before:
```
// feed.go:25 | Size: 560 (Optimal: 544)
type Feed struct {
ID int64 ■ ■ ■ ■ ■ ■ ■ ■
UserID int64 ■ ■ ■ ■ ■ ■ ■ ■
FeedURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
SiteURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Title string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Description string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
CheckedAt time.Time ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
NextCheckAt time.Time ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
EtagHeader string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
LastModifiedHeader string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
ParsingErrorMsg string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
ParsingErrorCount int ■ ■ ■ ■ ■ ■ ■ ■
ScraperRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
RewriteRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Crawler bool ■ □ □ □ □ □ □ □
BlocklistRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
KeeplistRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
BlockFilterEntryRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
KeepFilterEntryRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
UrlRewriteRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
UserAgent string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Cookie string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Username string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Password string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Disabled bool ■
NoMediaPlayer bool ■
IgnoreHTTPCache bool ■
AllowSelfSignedCertificates bool ■
FetchViaProxy bool ■
HideGlobally bool ■
DisableHTTP2 bool ■ □
AppriseServiceURLs string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
WebhookURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
NtfyEnabled bool ■ □ □ □ □ □ □ □
NtfyPriority int ■ ■ ■ ■ ■ ■ ■ ■
NtfyTopic string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
PushoverEnabled bool ■ □ □ □ □ □ □ □
PushoverPriority int ■ ■ ■ ■ ■ ■ ■ ■
ProxyURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Category *Category ■ ■ ■ ■ ■ ■ ■ ■
Icon *FeedIcon ■ ■ ■ ■ ■ ■ ■ ■
Entries Entries ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
TTL int ■ ■ ■ ■ ■ ■ ■ ■
IconURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
UnreadCount int ■ ■ ■ ■ ■ ■ ■ ■
ReadCount int ■ ■ ■ ■ ■ ■ ■ ■
NumberOfVisibleEntries int ■ ■ ■ ■ ■ ■ ■ ■
}
```
after:
```
// feed.go:25 | Size: 544
type Feed struct {
ID int64 ■ ■ ■ ■ ■ ■ ■ ■
UserID int64 ■ ■ ■ ■ ■ ■ ■ ■
FeedURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
SiteURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Title string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Description string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
CheckedAt time.Time ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
NextCheckAt time.Time ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
EtagHeader string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
LastModifiedHeader string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
ParsingErrorMsg string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
ParsingErrorCount int ■ ■ ■ ■ ■ ■ ■ ■
ScraperRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
RewriteRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
BlocklistRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
KeeplistRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
BlockFilterEntryRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
KeepFilterEntryRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
UrlRewriteRules string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
UserAgent string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Cookie string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Username string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Password string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Disabled bool ■
NoMediaPlayer bool ■
IgnoreHTTPCache bool ■
AllowSelfSignedCertificates bool ■
FetchViaProxy bool ■
HideGlobally bool ■
DisableHTTP2 bool ■
PushoverEnabled bool ■
NtfyEnabled bool ■
Crawler bool ■ □ □ □ □ □ □
AppriseServiceURLs string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
WebhookURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
NtfyPriority int ■ ■ ■ ■ ■ ■ ■ ■
NtfyTopic string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
PushoverPriority int ■ ■ ■ ■ ■ ■ ■ ■
ProxyURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
Category *Category ■ ■ ■ ■ ■ ■ ■ ■
Icon *FeedIcon ■ ■ ■ ■ ■ ■ ■ ■
Entries Entries ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
TTL int ■ ■ ■ ■ ■ ■ ■ ■
IconURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
UnreadCount int ■ ■ ■ ■ ■ ■ ■ ■
ReadCount int ■ ■ ■ ■ ■ ■ ■ ■
NumberOfVisibleEntries int ■ ■ ■ ■ ■ ■ ■ ■
}
```
before:
```
// request_builder.go:25 | Size: 64 (Optimal: 56)
type RequestBuilder struct {
headers http.Header ■ ■ ■ ■ ■ ■ ■ ■
clientProxyURL *url.URL ■ ■ ■ ■ ■ ■ ■ ■
useClientProxy bool ■ □ □ □ □ □ □ □
clientTimeout int ■ ■ ■ ■ ■ ■ ■ ■
withoutRedirects bool ■
ignoreTLSErrors bool ■
disableHTTP2 bool ■ □ □ □ □ □
proxyRotator *proxyrotator.ProxyRotator ■ ■ ■ ■ ■ ■ ■ ■
feedProxyURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
}
```
after:
```
// request_builder.go:25 | Size: 56
type RequestBuilder struct {
headers http.Header ■ ■ ■ ■ ■ ■ ■ ■
clientProxyURL *url.URL ■ ■ ■ ■ ■ ■ ■ ■
clientTimeout int ■ ■ ■ ■ ■ ■ ■ ■
useClientProxy bool ■
withoutRedirects bool ■
ignoreTLSErrors bool ■
disableHTTP2 bool ■ □ □ □ □
proxyRotator *proxyrotator.ProxyRotator ■ ■ ■ ■ ■ ■ ■ ■
feedProxyURL string ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■
}
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.2)
Can you help keep this open source service alive? 💖 Please sponsor : )