• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A Markdown shard for the Crystal programming language


Commit MetaInfo

修訂910afe9ad2bb0209a26e27e63177a131a58ab15e (tree)
時間2023-02-26 09:54:07
作者supercell <stigma@disr...>
Commitersupercell

Log Message

Small linting changes

Change Summary

差異

--- a/.ameba.yml
+++ b/.ameba.yml
@@ -1,3 +1,5 @@
11 # Disable since we're following dart-lang/markdown
22 Metrics/CyclomaticComplexity:
33 Enabled: false
4+Lint/NotNil:
5+ Enabled: false
--- a/example/main.cr
+++ b/example/main.cr
@@ -32,6 +32,8 @@ def serve_index(response : HTTP::Server::Response, params : URI::Params) : Nil
3232 Luce::ExtensionSet::NONE
3333 end
3434
35+ # `ren_markdown` is used in "index.ecr"
36+ # ameba:disable Lint/UselessAssign
3537 ren_markdown = Luce.to_html(markdown, extension_set: es)
3638 renderer = ECR.render "index.ecr"
3739 bytes = renderer.unsafe_byte_slice(0)
--- a/src/luce/legacy_emojis.cr
+++ b/src/luce/legacy_emojis.cr
@@ -2,7 +2,7 @@
22 #
33 # This file was generated from emojilib's data file:
44 # https://raw.githubusercontent.com/muan/emojilib/v2.4.0/emojis.json
5-# at 2023-02-25 04:34:09 UTC by the script, tools/update_emojis.cr.
5+# at 2023-02-25 08:44:29 UTC by the script, tools/update_emojis.cr.
66
77 module Luce
88 class LegacyEmojis
@@ -17,7 +17,7 @@ module Luce
1717 @@hash.fetch(name, nil)
1818 end
1919
20- def self.each(&block : Tuple(String, String) -> ) : Nil
20+ def self.each(& : Tuple(String, String) -> ) : Nil
2121 @@hash.each { |key| yield key }
2222 end
2323
--- a/tools/update_emoji.cr
+++ b/tools/update_emoji.cr
@@ -37,7 +37,7 @@ emoji_content.puts " def self.[]?(name : String) : String?"
3737 emoji_content.puts " @@hash.fetch(name, nil)"
3838 emoji_content.puts " end"
3939 emoji_content.puts
40-emoji_content.puts " def self.each(&block : Tuple(String, String) -> ) : Nil"
40+emoji_content.puts " def self.each(& : Tuple(String, String) -> ) : Nil"
4141 emoji_content.puts " @@hash.each { |key| yield key }"
4242 emoji_content.puts " end"
4343 emoji_content.puts
@@ -51,7 +51,7 @@ emoji_count = 0
5151 ignored = [] of String
5252
5353 # Dump in sorted order now to facilitate comparison with new GitHub emoji
54-sorted_keys = json.keys.sort
54+sorted_keys = json.keys.sort!
5555 sorted_keys.each do |name|
5656 info = json[name]
5757 if info.has_key?("char")
--- a/tools/update_github_emojis.cr
+++ b/tools/update_github_emojis.cr
@@ -161,7 +161,7 @@ def parse_github_filename_into_unicode_string(emoji_filename : String) : String
161161 end
162162 end
163163 end
164- code_points_hex.map { |hex| hex.chr }.join
164+ code_points_hex.map(&.chr).join
165165 rescue e
166166 STDERR.puts "Invalid/Non-Conformant emoji filename pattern found \"#{emoji_filename}\"!"
167167 ERROR_SPECIAL_REPLACEMENT
@@ -274,7 +274,7 @@ Options:"
274274 errored = [] of String
275275
276276 # Dump in sorted order now to facilitate comparison with new GitHub emoji
277- sorted_keys = shortcode_to_emoji.keys.sort
277+ sorted_keys = shortcode_to_emoji.keys.sort!
278278 sorted_keys.each do |shortcode_alias|
279279 emoji_unicode = shortcode_to_emoji[shortcode_alias]
280280