Bug 233254 - [NEW PORT]: textproc/chkascii : checks files for any ASCII values that are possibly junk
Summary: [NEW PORT]: textproc/chkascii : checks files for any ASCII values that are po...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mateusz Piotrowski
URL: https://reviews.freebsd.org/D18047
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-11-16 15:11 UTC by bourne.identity@hotmail.com
Modified: 2018-11-19 16:52 UTC (History)
3 users (show)

See Also:


Attachments
shar archive for chkascii (1.74 KB, text/plain)
2018-11-16 15:12 UTC, bourne.identity@hotmail.com
no flags Details
shar archive for chkascii (attempt# 2) (1.74 KB, text/plain)
2018-11-16 16:56 UTC, bourne.identity@hotmail.com
no flags Details
shar archive for chkascii (attempt# 3) (1.79 KB, text/plain)
2018-11-16 17:03 UTC, bourne.identity@hotmail.com
no flags Details
shar archive for chkascii (attempt# 4) (1.99 KB, text/plain)
2018-11-16 21:12 UTC, bourne.identity@hotmail.com
no flags Details
shar archive for chkascii (attempt# 5) (1.99 KB, text/plain)
2018-11-17 12:27 UTC, bourne.identity@hotmail.com
no flags Details
shar archive for chkascii (attempt# 6) (1.99 KB, text/plain)
2018-11-18 02:17 UTC, bourne.identity@hotmail.com
no flags Details
shar archive for chkascii (attempt# 7) (2.04 KB, text/plain)
2018-11-19 14:58 UTC, bourne.identity@hotmail.com
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description bourne.identity@hotmail.com 2018-11-16 15:11:18 UTC
chkascii is a small C program that checks files for any ASCII values that are possibly junk. Good ASCII values are considered as the following :

32-126
9
10

The user can optionally force additional ASCII values to be treated as good.

For good text files, chkascii will wind up by checking on proper EOL termination. If the file is not EOL-terminated, it too is reported as an error.
Comment 1 bourne.identity@hotmail.com 2018-11-16 15:12:05 UTC
Created attachment 199272 [details]
shar archive for chkascii
Comment 2 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-11-16 16:45:08 UTC
BTW, it looks like WWW is missing from pkg-descr.
Comment 3 bourne.identity@hotmail.com 2018-11-16 16:56:16 UTC
Created attachment 199274 [details]
shar archive for chkascii (attempt# 2)

characters read from disk now stored as unsigned char, not char
Comment 4 bourne.identity@hotmail.com 2018-11-16 17:03:01 UTC
Created attachment 199275 [details]
shar archive for chkascii (attempt# 3)

pkg-descr now has WWW

Mateusz, thanks for spotting the glitch. But should portlint not be checking for WWW if Makefile has 'USE_GITHUB=yes'
Comment 5 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-11-16 17:20:30 UTC
(In reply to bourne.identity@hotmail.com from comment #4)

Well, not really. Many projects hosting their code on GitHub have a dedicated homepage which is not the GitHub repository.
Comment 6 bourne.identity@hotmail.com 2018-11-16 21:12:42 UTC
Created attachment 199281 [details]
shar archive for chkascii (attempt# 4)

Minor fixes in app/man/pkg-descr.
Comment 7 bourne.identity@hotmail.com 2018-11-17 12:27:05 UTC
Created attachment 199290 [details]
shar archive for chkascii (attempt# 5)

Improvements to app (next pointer initialized properly) and doc (return values incorporated).
Comment 8 bourne.identity@hotmail.com 2018-11-18 02:17:20 UTC
Created attachment 199305 [details]
shar archive for chkascii (attempt# 6)

app now uses a factory method for node management
Comment 9 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-11-19 13:40:05 UTC
Please make sure that you address all the warnings reported by portlint next time.

It looks like LICENSE and LICENSE_FILE are missing. What is the license this software is released under?
Comment 10 bourne.identity@hotmail.com 2018-11-19 14:58:29 UTC
Created attachment 199342 [details]
shar archive for chkascii (attempt# 7)

LICENSE/LICENSE_FILE now included
Comment 11 commit-hook freebsd_committer freebsd_triage 2018-11-19 15:25:25 UTC
A commit references this bug:

Author: 0mp
Date: Mon Nov 19 15:25:09 UTC 2018
New revision: 485326
URL: https://svnweb.freebsd.org/changeset/ports/485326

Log:
  New port: textproc/chkascii: Check an ASCII text file for invalid characters

  chkascii is a small C program that checks files for any ASCII values
  that are possibly junk. The following are considered the only good ASCII
  values permissible in a text file: 32-126, 9, 10

  The user can optionally force additional ASCII values to be treated as
  good.

  For good text files, chkascii will wind up by checking on proper EOL
  termination. If the file is not EOL-terminated, that too is reported as
  an error.

  WWW: https://github.com/bourne-again/chkascii

  PR:		233254
  Submitted by:	bourne.identity@hotmail.com
  Reviewed by:	krion
  Approved by:	krion (mentor)
  Differential Revision:	https://reviews.freebsd.org/D18047

Changes:
  head/textproc/Makefile
  head/textproc/chkascii/
  head/textproc/chkascii/Makefile
  head/textproc/chkascii/distinfo
  head/textproc/chkascii/pkg-descr
Comment 12 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-11-19 15:29:59 UTC
Committed! Thanks!
Comment 13 bourne.identity@hotmail.com 2018-11-19 16:52:53 UTC
Thanks so much, Mateusz