mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-03-17 20:57:51 +02:00
Ensure codespell failures fail CI (#5761)
With the `write` option, codespell fixes issues (which is a nice behavior when we run it locally), but it also returns a 0 status code (except if some failures couldn't be fixed). So in order to actually fix the CI on a failing codespell, we need to ensure the working directory is clean.
This commit is contained in:
parent
932a4d8a5f
commit
38dfcb2330
1
.github/workflows/codespell.yaml
vendored
1
.github/workflows/codespell.yaml
vendored
@ -12,3 +12,4 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Codespell
|
||||
run: make codespell
|
||||
- run: make check-clean-work-tree
|
||||
|
@ -50,7 +50,7 @@ type Property struct {
|
||||
// component boundaries may impose their own restrictions on Property key.
|
||||
// For example, the W3C Baggage specification restricts the Property keys to strings that
|
||||
// satisfy the token definition from RFC7230, Section 3.2.6.
|
||||
// For maximum compatibility, alpha-numeric value are strongly recommended to be used as Property key.
|
||||
// For maximum compatibility, alphanumeric value are strongly recommended to be used as Property key.
|
||||
func NewKeyProperty(key string) (Property, error) {
|
||||
if !validateBaggageName(key) {
|
||||
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key)
|
||||
@ -90,7 +90,7 @@ func NewKeyValueProperty(key, value string) (Property, error) {
|
||||
// component boundaries may impose their own restrictions on Property key.
|
||||
// For example, the W3C Baggage specification restricts the Property keys to strings that
|
||||
// satisfy the token definition from RFC7230, Section 3.2.6.
|
||||
// For maximum compatibility, alpha-numeric value are strongly recommended to be used as Property key.
|
||||
// For maximum compatibility, alphanumeric value are strongly recommended to be used as Property key.
|
||||
func NewKeyValuePropertyRaw(key, value string) (Property, error) {
|
||||
if !validateBaggageName(key) {
|
||||
return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key)
|
||||
@ -287,7 +287,7 @@ func NewMember(key, value string, props ...Property) (Member, error) {
|
||||
// component boundaries may impose their own restrictions on baggage key.
|
||||
// For example, the W3C Baggage specification restricts the baggage keys to strings that
|
||||
// satisfy the token definition from RFC7230, Section 3.2.6.
|
||||
// For maximum compatibility, alpha-numeric value are strongly recommended to be used as baggage key.
|
||||
// For maximum compatibility, alphanumeric value are strongly recommended to be used as baggage key.
|
||||
func NewMemberRaw(key, value string, props ...Property) (Member, error) {
|
||||
m := Member{
|
||||
key: key,
|
||||
|
@ -41,7 +41,7 @@ func NewFilteredReservoir[N int64 | float64](f Filter, r Reservoir) FilteredRese
|
||||
|
||||
func (f *filteredReservoir[N]) Offer(ctx context.Context, val N, attr []attribute.KeyValue) {
|
||||
if f.filter(ctx) {
|
||||
// only record the current time if we are sampling this measurment.
|
||||
// only record the current time if we are sampling this measurement.
|
||||
f.reservoir.Offer(ctx, time.Now(), NewValue(val), attr)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user