Skip to content

Fix misleading type_from_binary instructions in file-sniffer#1638

Merged
angelikatyborska merged 1 commit into
exercism:mainfrom
frozar:patch-1
Jun 17, 2026
Merged

Fix misleading type_from_binary instructions in file-sniffer#1638
angelikatyborska merged 1 commit into
exercism:mainfrom
frozar:patch-1

Conversation

@frozar

@frozar frozar commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a misleading sentence in the File Sniffer concept exercise.

The type_from_binary/1 function receives a binary file and determines the media type from the file signature. The previous wording mentioned the extension not matching, but extensions are handled by type_from_extension/1 and verify/2.

This change clarifies that type_from_binary/1 returns nil when the file signature does not match the expected ones.

This PR fixes a misleading sentence in the File Sniffer concept exercise.

The `type_from_binary/1` function receives a binary file and determines the media type from the file signature. The previous wording mentioned the extension not matching, but extensions are handled by `type_from_extension/1` and `verify/2`.

This change clarifies that `type_from_binary/1` returns `nil` when the file signature does not match the expected ones.
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for contributing to exercism/elixir 💜 🎉. This is an automated PR comment 🤖 for the maintainers of this repository that helps with the PR review process. You can safely ignore it and wait for a maintainer to review your changes.

Based on the files changed in this PR, it would be good to pay attention to the following details when reviewing the PR:

  • General steps

    • 🏆 Does this PR need to receive a label with a reputation modifier (x:size/{tiny,small,medium,large,massive})? (A medium reputation amount is awarded by default, see docs)
  • Any exercise changed

    • 👤 Does the author of the PR need to be added as an author or contributor in <exercise>/.meta/config.json (see docs)?
    • 🔬 Do the analyzer and the analyzer comments exist for this exercise? Do they need to be changed?
    • 📜 Does the design file (<exercise>/.meta/design.md) need to be updated to document new implementation decisions?
  • Concept exercise changed

    • 🌲 Do prerequisites and practices in config.json need to be updated?
    • 📖 Does the concept introduction provide all necessary information to solve this exercise?

Automated comment created by PR Commenter 🤖.

@angelikatyborska angelikatyborska left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this makes sense!

@angelikatyborska angelikatyborska merged commit 6368638 into exercism:main Jun 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants