From 7fce6c50e3be72149de13b901f69da16b8716012 Mon Sep 17 00:00:00 2001 From: Martin Tournoij Date: Wed, 11 Sep 2024 00:18:43 +0100 Subject: [PATCH] Small staticcheck fixes --- format.go | 2 +- staticcheck.conf | 1 + unidata/emoji.go | 18 +++++++++--------- 3 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 staticcheck.conf diff --git a/format.go b/format.go index a1e0b4f..5602cfd 100644 --- a/format.go +++ b/format.go @@ -220,7 +220,7 @@ func (f *Format) processColumn(line string) error { return nil } -// Add a new line. +// Line adds a new line. func (f *Format) Line(columns map[string]string) error { if f.tbl() { // Don't need to do anything. return nil diff --git a/staticcheck.conf b/staticcheck.conf new file mode 100644 index 0000000..a8c9a17 --- /dev/null +++ b/staticcheck.conf @@ -0,0 +1 @@ +checks = ['all'] diff --git a/unidata/emoji.go b/unidata/emoji.go index 0d8c3b4..d2b926a 100644 --- a/unidata/emoji.go +++ b/unidata/emoji.go @@ -178,9 +178,9 @@ func (e Emoji) With(mod EmojiModifier, selmod ...EmojiModifier) Emoji { // 1F469 200D 2764 FE0F 200D 1F48B 200D 1F468 kiss: woman, man // 👩 🏼 ❤️ 💋 👨 🏽 // 1F469 1F3FC 200D 2764 FE0F 200D 1F48B 200D 1F468 1F3FD kiss: woman, man, medium-light skin tone, medium skin tone - if isEmoji(e, 0x1F48F) { - // TODO - } + //if isEmoji(e, 0x1F48F) { + // // TODO + //} // And finally with a heart: // @@ -190,9 +190,9 @@ func (e Emoji) With(mod EmojiModifier, selmod ...EmojiModifier) Emoji { // 1F491 1F3FB couple with heart: light skin tone // 🧑 🏾 ❤ 🧑 🏻 // 1F9D1 1F3FE 200D 2764 FE0F 200D 1F9D1 1F3FB couple with heart: person, person, medium-dark skin tone, light skin tone - if isEmoji(e, 0x1F491) { - // TODO - } + //if isEmoji(e, 0x1F491) { + // // TODO + //} // "Family" supports settings the four family members' gender (no skintone // support): @@ -207,9 +207,9 @@ func (e Emoji) With(mod EmojiModifier, selmod ...EmojiModifier) Emoji { // 1F468 200D 1F467 family: man, girl // 👨 👧 👦 // 1F468 200D 1F467 200D 1F466 family: man, girl, boy - if isEmoji(e, 0x1F46A) { - // TODO - } + //if isEmoji(e, 0x1F46A) { + // // TODO + //} e = e.applyGender(mod & (ModPerson | ModMale | ModFemale)) e = e.applyTone(mod &^ (ModPerson | ModMale | ModFemale))